Re: Constraint problem

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Constraint problem
Дата
Msg-id GNELIHDDFBOCMGBFGEFOAEKECCAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: Constraint problem  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-sql
What about using an intermediary value such as -1;

update foo set a = -1;
update foo set b = old a value;
update foo set a = old b value;

Sort of thing?

Chris

> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Josh Berkus
> Sent: Friday, 17 May 2002 3:30 AM
> To: Stephan Szabo
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] Constraint problem
>
>
>
> Stephan,
> > > I don't seem to be able to create a UNIQUE constraint as
> DEFERRABLE.  Is
> this
> > > not supported?
> >
> > Not currently.
>
> Hmm ... my workaround didn't work.   I need to impose a unique
> constraint on
> an INT column in a table, but make sure that the constraint isn't checked
> until the end of an UPDATE statement, so that I can swap values
> when I need
> to.
>
> How can I do this?
>
> --
> -Josh Berkus
>
> ______AGLIO DATABASE SOLUTIONS___________________________
>                                         Josh Berkus
>    Complete information technology     josh@agliodbs.com
>     and data management solutions     (415) 565-7293
>    for law firms, small businesses      fax 621-2533
>     and non-profit organizations.     San Francisco
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>



В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Constraint problem
Следующее
От: Masaru Sugawara
Дата:
Сообщение: Re: how to build this list ?