Re: unable to drop a constraint - Mailing list pgsql-general

From Tom Lane
Subject Re: unable to drop a constraint
Date
Msg-id 7974.1216219216@sss.pgh.pa.us
Whole thread Raw
In response to unable to drop a constraint  (Enrico Sirola <enrico.sirola@gmail.com>)
Responses Re: unable to drop a constraint
List pgsql-general
Enrico Sirola <enrico.sirola@gmail.com> writes:
> I have two tables, one has a field with a foreign key pointing to the
> primary key of another table. When I to drop the first table, I get
> the following error:

> test=# drop table user;
> ERROR:  "customer_pkey" is an index

I don't think you're being entirely truthful with us, because "user"
is a reserved word.  If you'd typed exactly that, you would have
gotten

regression=# drop table user;
ERROR:  syntax error at or near "user"
LINE 1: drop table user;
                   ^

I'm not certain if this is just pilot error or if there really is
something odd going on, but obfuscating what you're doing doesn't
make it easier to decipher.  Please show what you really typed and
what you really got back.  psql \d output for the two tables might
be helpful too.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 8.3.3 regression test on SCO 5.0.7
Next
From: "Haim Ashkenazi"
Date:
Subject: Which design would be faster ...