Re: Rename constraint?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Rename constraint?
Date: 2003-04-24 15:41:15
Message-ID: 13928.1051198875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jeff Boes <jboes(at)nexcerpt(dot)com> writes:
> I have tables which were created with unnamed constraints:
> How can I identify and rename the "$2" and "$3" constraints?

Look in pg_relcheck or pg_constraint, depending on your PG version.
I think you should be able to get away with just updating the name
column. (Not sure whether existing backend sessions will notice such
an update, but at worst starting a fresh session would make it take
effect.)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Brusser 2003-04-24 15:43:26 Re: GRANT on all tables?
Previous Message Adam Witney 2003-04-24 15:40:03 Re: Creating schema for multiple tables/fields/indices.