Thread: How to workaround DROP CONSTRAINT [ IF EXISTS ] in Postgres version 8.1?
Hello, I found that DROP CONSTRAINT [ IF EXISTS ] is available in Postgres 9.1 http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html But it is not avaiable in Postgres 8.1 http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html Is there a way to achieve this on Postgres 8.1? Thanks a lot -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-workaround-DROP-CONSTRAINT-IF-EXISTS-in-Postgres-version-8-1-tp3368570p3368570.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
Re: How to workaround DROP CONSTRAINT [ IF EXISTS ] in Postgres version 8.1?
From
Viktor Bojović
Date:
use function which searches through this tables: <br /><br />-pg_constraint<br />-pg_trigger<br /><br /><div class="gmail_quote">OnWed, Feb 2, 2011 at 11:21 PM, creationw <span dir="ltr"><<a href="mailto:mr.creation.register@gmail.com">mr.creation.register@gmail.com</a>></span>wrote:<br /><blockquote class="gmail_quote"style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br />Hello,<br /><br /><br /> I found that DROP CONSTRAINT [ IF EXISTS ] is available in Postgres 9.1<br /><a href="http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html" target="_blank">http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html</a><br/><a href="http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html" target="_blank">http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html</a><br/><br /><br /> But it is not avaiablein Postgres 8.1<br /><a href="http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html" target="_blank">http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html</a><br/><a href="http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html" target="_blank">http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html</a><br/><br /><br /> Is there a way toachieve this on Postgres 8.1?<br /><br /> Thanks a lot<br /> --<br /> View this message in context: <a href="http://postgresql.1045698.n5.nabble.com/How-to-workaround-DROP-CONSTRAINT-IF-EXISTS-in-Postgres-version-8-1-tp3368570p3368570.html" target="_blank">http://postgresql.1045698.n5.nabble.com/How-to-workaround-DROP-CONSTRAINT-IF-EXISTS-in-Postgres-version-8-1-tp3368570p3368570.html</a><br />Sent from the PostgreSQL - sql mailing list archive at Nabble.com.<br /><font color="#888888"><br /> --<br /> Sent viapgsql-sql mailing list (<a href="mailto:pgsql-sql@postgresql.org">pgsql-sql@postgresql.org</a>)<br /> To make changesto your subscription:<br /><a href="http://www.postgresql.org/mailpref/pgsql-sql" target="_blank">http://www.postgresql.org/mailpref/pgsql-sql</a><br/></font></blockquote></div><br /><br clear="all" /><br/>-- <br />---------------------------------------<br />Viktor Bojović<br />---------------------------------------<br/>Wherever I go, Murphy goes with me<br />