Re: [GENERAL] Renaming constraints

2009-10-08 Thread Thom Brown
2009/10/8 Tom Lane > You'd probably better rename the constraint too to avoid confusion. > Failing anything else, there's always direct UPDATE of the pg_constraint > catalog. > > If it's only a matter of the entry in the pg_constraint catalog being changed, couldn't a more intuitive SQL-style ins

Re: [GENERAL] Renaming constraints

2009-10-08 Thread Tom Lane
Andreas Kalsch writes: > But with this operation you will recreate the whole index. - I have > found out, that the name of the constraint's index is the same as the > constraint, so that I can simply rename the index. You'd probably better rename the constraint too to avoid confusion. Failing a

Re: [GENERAL] Renaming constraints

2009-10-08 Thread Andreas Kalsch
But with this operation you will recreate the whole index. - I have found out, that the name of the constraint's index is the same as the constraint, so that I can simply rename the index. My problem is that I want to "hook up" a new version of existing tables into my production system. 1) W

Re: [GENERAL] Renaming constraints

2009-10-08 Thread David Fetter
On Thu, Oct 08, 2009 at 08:24:06PM +0200, Andreas Kalsch wrote: > How do I rename constraints? Renaming columns will not rename constraints. BEGIN; ALTER TABLE foo DROP CONSTRAINT bar; ALTER TABLE foo ADD CONSTRAINT bluf...; COMMIT; Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 41

[GENERAL] Renaming constraints

2009-10-08 Thread Andreas Kalsch
How do I rename constraints? Renaming columns will not rename constraints. Andi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general