Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group