Search Postgresql Archives

Re: Dynamic constraint names in ALTER TABLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



patrick keshishian <pkeshish@xxxxxxxxx> writes:
> The question wasn't where does one find the name of the constraint. My
> example demonstrated that I knew how to get that value. The question,
> however, is how do you get that in an ALTER TABLE statement?

You'd need to construct the ALTER statement as a string value and then
EXECUTE it, using a plpgsql function.  (In 9.0 you could use a DO
command, but if you want this to also work in 7.4, it'll have to be a
plain old function.)

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux