constraint is not dropped when table is dropped (maybe php related???)

From: Mary Anderson <maryfran(at)demog(dot)berkeley(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: constraint is not dropped when table is dropped (maybe php related???)
Date: 2009-04-03 00:38:35
Message-ID: 49D55A8B.1010306@demog.berkeley.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,

I do the following :

DROP TABLE IF EXISTS xprod;
CREATE TABLE xprod( dm1 INTEGER
d5 INTEGER
value DOUBLE);
ALTER TABLE xprod
ADD CONSTRAINT xprod_p_key PRIMARY KEY (dm1,d5)

If I run this once, everything is OK. (Actually these are
postresql statements extracted from a php script)
If I rerun this script I get an error
'relation "xprod_p_key" already exists.

I have tried to replicate this with straight postgresql statements
and find that constraints are dropped when the table
is dropped. Any clues as to what is happening would be appreciated.

Mary

Browse pgsql-novice by date

  From Date Subject
Next Message Mary Anderson 2009-04-03 00:58:10 Re: constraint is not dropped when table is dropped
Previous Message Robert Schnabel 2009-04-02 16:13:59 WAL and TMP directory locations