constraint is not dropped when table is dropped (maybe php related???) - Mailing list pgsql-novice

From Mary Anderson
Subject constraint is not dropped when table is dropped (maybe php related???)
Date
Msg-id 49D55A8B.1010306@demog.berkeley.edu
Whole thread Raw
List 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


pgsql-novice by date:

Previous
From: Mary Anderson
Date:
Subject: Re: constraint is not dropped when table is dropped
Next
From: Michael Lush
Date:
Subject: Re: grouping by time interval