UNIQUE contraint that is initially deferred in Postgres 8.4.13 - Mailing list pgsql-general

From Johannes Bauer
Subject UNIQUE contraint that is initially deferred in Postgres 8.4.13
Date
Msg-id 53219DA1.40602@gmx.de
Whole thread Raw
Responses Re: UNIQUE contraint that is initially deferred in Postgres 8.4.13  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
Hi list,

I'm having trouble with a UNIQUE constraint that I need to have
DEFERRABLE INITIALLY DEFERRED. On my Dev machine (Postgres 9.1) it works
fine:

alter table foo drop constraint bar;
ALTER TABLE

alter table foo add constraint bar UNIQUE (col1, col2) deferrable
initially deferred;
ALTER TABLE


In Production (Postgres 8.4.13) this blows up in my face although it
should be supported according to the docs:


alter table foo drop constraint bar;
ALTER TABLE

alter table foo add constraint bar UNIQUE (col1, col2) deferrable
initially deferred;
FEHLER:  Syntaxfehler bei »DEFERRABLE«
LINE 1: bar UNIQUE (col1, col2) DEFERRABLE...
                                ^

(i.e. syntax error at "DEFERRABLE", psql seems to ignore my locale
setting).

Does somebody know what the reason for this could be? I'm kind of puzzled.

Thanks in advance,
Best regards,
Joe


pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: FATAL: the database system is starting up
Next
From: Magnus Hagander
Date:
Subject: Re: UNIQUE contraint that is initially deferred in Postgres 8.4.13