Re: unable to drop a constraint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Enrico Sirola <enrico(dot)sirola(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: unable to drop a constraint
Date: 2008-07-16 14:40:16
Message-ID: 7974.1216219216@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Enrico Sirola <enrico(dot)sirola(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Haim Ashkenazi 2008-07-16 14:40:50 Which design would be faster ...
Previous Message Tom Lane 2008-07-16 14:14:40 Re: 8.3.3 regression test on SCO 5.0.7