Datatype SERIAL incorrectly interpreted

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Datatype SERIAL incorrectly interpreted
Дата
Msg-id 200103281637.f2SGbq236999@hub.org
обсуждение исходный текст
Ответы Re: Datatype SERIAL incorrectly interpreted  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hubert Hafner (dogart@iname.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Datatype SERIAL incorrectly interpreted

Long Description
If you create a table with more than 1 SERIAL, only for the last a sequence is created by PostgreSQL. The other fields
onlyset to INTEGER, but there is no sequence for. 

Sample Code
CREATE TABLE Example (Field1 SERIAL, Field2 SERIAL);

PostgreSQL would generate:
Table Example:
Field1 as INTEGER NOT NULL DEFAULT nextval(Field1_Example_seq)
Field2 as INTEGER NOT NULL DEFAULT nextval(Field2_Example_seq)

But only Field2_Example_seq really exits!




No file was uploaded with this report

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.0.3 max function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Datatype SERIAL incorrectly interpreted