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

Поиск
Список
Период
Сортировка
От Mary Anderson
Тема constraint is not dropped when table is dropped (maybe php related???)
Дата
Msg-id 49D55A8B.1010306@demog.berkeley.edu
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Mary Anderson
Дата:
Сообщение: Re: constraint is not dropped when table is dropped
Следующее
От: Michael Lush
Дата:
Сообщение: Re: grouping by time interval