Re: Renaming constraints

From: Thom Brown <thombrown(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Kalsch <andreaskalsch(at)gmx(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Renaming constraints
Date: 2009-10-08 20:20:32
Message-ID: bddc86150910081320l7b4cc2cbh51fdfd2bbef24d32@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/10/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-10-08 20:22:26 Re: interface for "non-SQL people"
Previous Message Tom Lane 2009-10-08 20:07:25 Re: Renaming constraints