Re: Renaming constraints - Mailing list pgsql-general

From Thom Brown
Subject Re: Renaming constraints
Date
Msg-id bddc86150910081320l7b4cc2cbh51fdfd2bbef24d32@mail.gmail.com
Whole thread Raw
In response to Re: Renaming constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
2009/10/8 Tom Lane <tgl@sss.pgh.pa.us>
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 instruction be included in a future release?

Such as:

ALTER TABLE my_table RENAME CONSTRAINT my_constraint TO your_constraint;

For backwards compatibility, omission of a keyword after "RENAME" could just default to meaning "COLUMN" like it currently does.

Thom Brown

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Renaming constraints
Next
From: Merlin Moncure
Date:
Subject: Re: interface for "non-SQL people"