Re: Primary key constraints

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: Primary key constraints
Дата
Msg-id 002801c52370$91a6e370$1f6df345@WATSON
обсуждение исходный текст
Ответ на Primary key constraints  (Kumar S <ps_postgres@yahoo.com>)
Список pgsql-novice
Kumar,

You can drop a sequence by doing:

drop sequence experiment_exp_id_seq;

See the documentation here:

http://www.postgresql.org/docs/8.0/static/sql-dropsequence.html

However, that should happen automatically if it was defined as a serial and
you dropped the table, so I'm not sure what is going on.  If the drop
sequence doesn't work, perhaps you could tell us what the table definition
for experiment used to look like and what your table def for study now looks
like.

Sean

----- Original Message -----
From: "Kumar S" <ps_postgres@yahoo.com>
To: <pgsql-novice@postgresql.org>
Sent: Monday, March 07, 2005 5:27 PM
Subject: [NOVICE] Primary key constraints


> Hi group,
>
>
> I removed a table from db names experiment.
> It has a primary key exp_id (experiment_exp_id_seq)
>
> I renamed that table to study. I re-created experiment
> table with all new column names.  exp_id
> (experiment_exp_id_seq) remains the primary key for
> this table.
>
> Now when I try to execute this table I get the
> following error:
>
> psql:/home/db/experiment.sql:10: ERROR:  relation
> "experiment_exp_id_seq" already exists
>
>
> How to remove this key from every where from the whole
> db.
>
> Thank you.
>
> K
>
>
>
>
> __________________________________
> Celebrate Yahoo!'s 10th Birthday!
> Yahoo! Netrospective: 100 Moments of the Web
> http://birthday.yahoo.com/netrospective/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>



В списке pgsql-novice по дате отправления:

Предыдущее
От: Kumar S
Дата:
Сообщение: Primary key constraints
Следующее
От: Bearden Barnes
Дата:
Сообщение: Re: [ADMIN] PostgreSQL installation problem on Windows XP Home