Re: Bug?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Bug?
Дата
Msg-id 20011115075338.Y7419-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Bug?  (Rasmus Resen Amossen <NOSPAM@hey.com>)
Список pgsql-general
On Thu, 15 Nov 2001, Rasmus Resen Amossen wrote:

> I am using postgresql-7.0.3 and is now having a strange problem!!!
> I got a table with a "serial" attribute. For example
> CREATE TABLE test (
>   id SERIAL NOT NULL,
>   val INT
> );
>
> The the following insertions creates an error:
> INSERT INTO test(id,val) VALUES (1,1);
> INSERT INTO test(val) VALUES (1);
>
> Error:
> Cannot insert a duplicate key into unique index test_id_key
>
> After that I can just re�eat the second line and insert without errors.
> Is this bug fixed in newer versions?

You shouldn't insert values into the serial column :).  Or at least if you
are going to do manual inserts you need to update the sequence as well.




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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Postgres+Delphi
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Bug?