Re: pg_dump serial UNIQUE NOT NULL PRIMARY KEY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump serial UNIQUE NOT NULL PRIMARY KEY
Дата
Msg-id 18178.1114208020@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_dump serial UNIQUE NOT NULL PRIMARY KEY  (Michael Hipp <Michael@Hipp.com>)
Список pgsql-general
Michael Hipp <Michael@Hipp.com> writes:
> Hello, I'm a fairly new user of PostgreSQL 8.0.2 and I'm creating a table like
> this:

> CREATE TABLE cases (
>      id serial PRIMARY KEY,

> Works fine, but when I pg_dump the database, what shows up in the dump is:

> CREATE TABLE cases (
>      id serial NOT NULL,

pg_dump prefers to add the PRIMARY KEY via an ALTER TABLE, after it's
got done loading data into the table.  This is basically a speed hack
(see the manual's advice about bulk data loading).

If you don't see an appropriate ALTER down near the end of the dump,
then you've got grounds for complaint ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq Unicode support?
Следующее
От: David Roussel
Дата:
Сообщение: Re: libpq Unicode support?