UNIQUE contraint that is initially deferred in Postgres 8.4.13

From: Johannes Bauer <dfnsonfsduifb(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: UNIQUE contraint that is initially deferred in Postgres 8.4.13
Date: 2014-03-13 11:59:29
Message-ID: 53219DA1.40602@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2014-03-13 12:02:50 Re: UNIQUE contraint that is initially deferred in Postgres 8.4.13
Previous Message David Johnston 2014-03-13 06:42:19 Re: FATAL: the database system is starting up