On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I believe you can rename the underlying indexes and the constraints will
follow them. (This works in HEAD anyway, not sure how far back.)
Below is my table:
inkpress=# \d marketing
Table public.marketing
Column |
Carlos Mennens carlos.menn...@gmail.com writes:
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I believe you can rename the underlying indexes and the constraints will
follow them. (This works in HEAD anyway, not sure how far back.)
I renamed the table name from
On Sat, Apr 9, 2011 at 12:58 PM, Tom Lane t...@sss.pgh.pa.us wrote:
ALTER INDEX accounts_pkey RENAME TO whatever
On very old versions of PG you may have to spell that ALTER TABLE
instead of ALTER INDEX, but it's the same thing either way.
Thank you so much for clearing that up for me Tom! I
On Saturday, April 09, 2011 2:59:06 pm Carlos Mennens wrote:
On Sat, Apr 9, 2011 at 12:58 PM, Tom Lane t...@sss.pgh.pa.us wrote:
ALTER INDEX accounts_pkey RENAME TO whatever
On very old versions of PG you may have to spell that ALTER TABLE
instead of ALTER INDEX, but it's the same thing
On Saturday, April 09, 2011 2:59:06 pm Carlos Mennens wrote:
Is there a difference between an INDEX and a CONSTRAINT?
Oops forgot to add this to my previous reply.
The short version, an INDEX is one form of a CONSTRAINT. For the long version
look at the CREATE TABLE section of the docs. It
I've searched and really can't find a definitive example or someone
renaming a constraint. I renamed a table yesterday and noticed that
the constraint name was still named the old table name:
inkpress=# ALTER TABLE accounts RENAME TO fashion;
ALTER TABLE
inkpress=# \d fashion
Table
Carlos Mennens carlos.menn...@gmail.com writes:
1. Do I need to remove all the table constraints or is there a way to
rename them?
I believe you can rename the underlying indexes and the constraints will
follow them. (This works in HEAD anyway, not sure how far back.)
2. When renaming the
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I believe you can rename the underlying indexes and the constraints will
follow them. (This works in HEAD anyway, not sure how far back.)
I'm sorry but I don't understand what that means or how to relate that
to a SQL command
Carlos Mennens wrote:
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I believe you can rename the underlying indexes and the constraints will
follow them. (This works in HEAD anyway, not sure how far back.)
I'm sorry but I don't understand what that means or how