Re: sequence last_value

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: sequence last_value
Дата
Msg-id web-146834@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на sequence last_value  ("Duncan Adams (DNS)" <duncan.adams@vcontractor.co.za>)
Список pgsql-novice
Duncan,

>
> wireman=# insert into loc values (1,1,'HELP');
> ERROR:  Cannot insert a duplicate key into unique index loc_pkey

Try this instead:

INSERT INTO loc ( building_key, floor, ref )
VALUES (1, 1, 'Help');

Explicit column naming in INSERTs is always a good idea.

Also, upgrading to 7.1.3 would be a good idea, although unrelated to
your problem.

Finally, SERIAL and NEXTVAL sequences do not work properly in older
versions of pgODBC, if you're using a WIndows client.  Upgrading to the
new pgAdmin will solve this.

-Josh Berkus


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

Предыдущее
От: "Duncan Adams (DNS)"
Дата:
Сообщение: sequence last_value
Следующее
От: nandalal gunaratne
Дата:
Сообщение: installation problem -please help