Re: Bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug?
Дата
Msg-id 12664.1005841042@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug?  (Rasmus Resen Amossen <NOSPAM@hey.com>)
Список pgsql-general
Rasmus Resen Amossen <NOSPAM@hey.com> writes:
> 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

If you're going to assign IDs manually, you might want to set
the sequence generator past those values.  See setval().

            regards, tom lane

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

Предыдущее
От: Vivek Khera
Дата:
Сообщение: Re: Modifying check constraints
Следующее
От: "Jacob Vennervald Madsen"
Дата:
Сообщение: Re: Postgres+Delphi