Re: drop table failed to drop associated sequence

Поиск
Список
Период
Сортировка
От Henry House
Тема Re: drop table failed to drop associated sequence
Дата
Msg-id 20020603164044.GA17716@wotan.hajhouse.org
обсуждение исходный текст
Ответ на drop table failed to drop associated sequence  (Juan Rojas <j.rojas@tiba.com>)
Список pgsql-admin
On Mon, Jun 03, 2002 at 12:59:27PM -0300, Juan Rojas wrote:
> Hi,
> I'm running PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96.
> I have a problem when I drop a table which contains a serial field. The
> system drops the table but the associated sequence still remains in the
> catalog, so if I want to create the table again with the same structure,
> CREATE TABLE throws an error because the sequence that it's trying to create
> already exists.

That's easy enough: just run a 'DROP SEQUENCE <sequence_name>' to remove the
sequence before re-creating the table. You may discover the name of the
sequence using '\ds' in psql.

--
Henry House
The attached file is a digital signature. See <http://romana.hajhouse.org/pgp>
for information.  My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.

Вложения

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

Предыдущее
От: Juan Rojas
Дата:
Сообщение: drop table failed to drop associated sequence
Следующее
От: "Nicolas Nolst"
Дата:
Сообщение: performance issues with DBI module when data too big