Re: DROP CONSTRAINT IF EXISTS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: william(dot)a(dot)dean(at)gdc4s(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: DROP CONSTRAINT IF EXISTS
Date: 2010-08-13 23:53:59
Message-ID: 25298.1281743639@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<william(dot)a(dot)dean(at)gdc4s(dot)com> writes:
> The sql statement 'ALTER TABLE <table name> DROP CONSTRAINT IF EXISTS
> <constraint-name>' returns with a syntax error on exists. The
> documentation states that the IF EXISTS clause is allowed in DROP
> CONSTRAINT statements.

Apparently you're reading 9.0 documentation and using a pre-9.0 server.
Please see the manual appropriate to your PG version.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Samuel Marinov 2010-08-14 00:14:37 BUG #5620: PostgreSQL won't accept the word "user" as a valid column name
Previous Message william.a.dean 2010-08-13 19:26:49 DROP CONSTRAINT IF EXISTS