How to rename a constraint/trigger??

From: "Andrei Bintintan" <klodoma(at)ar-sd(dot)net>
To: <pgsql-sql(at)postgresql(dot)org>, <pgsql-admin(at)postgresql(dot)org>
Subject: How to rename a constraint/trigger??
Date: 2004-09-06 14:03:02
Message-ID: 023201c4941a$3ade6350$0b00a8c0@forge
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Hi to all,

I have a database, where in the tables I have around 100 constrains (link to other tables) that don't have a name "<unnamed>" or they have a name like "$1" "$2". Now, I have a module which bases on the same structure, but I get some query errors from a "<unnamed>" constraint. I really don't know exaclty which the constrain generates the error, in that table I have 12 such constrains.

Does anyone have a script or it exist a command so that I can rename all the "<unnamed>"constrains in this database?

I'm using postgre 7.3.2.

Thankx,
Andy.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jean-Luc Lachance 2004-09-06 14:36:21 Re: duplicates
Previous Message Michael Paesold 2004-09-06 12:30:52 Re: duplicates

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel M. 2004-09-06 19:37:27 Re: Storing properties in a logical way.
Previous Message Oliver Elphick 2004-09-06 06:24:48 Re: Full access to a DB with a second user?