unique id's and incr

Поиск
Список
Период
Сортировка
От G.L. Grobe
Тема unique id's and incr
Дата
Msg-id 003801c113d3$86c94890$0200a8c0@trinity
обсуждение исходный текст
Ответы RE: unique id's and incr  ("Dave Cramer" <Dave@micro-automation.net>)
Список pgsql-general
During the creation of my database, I'm doing a:
 
CREATE UNIQUE INDEX account_idx ON Accounts (account_id);
 
to add new rows to my table and keep the id's unique.
 
During runtime (accessing by JDBC), is there anyway when adding a new row to a table to know the last id entry so as to incr the next one for a new id. I was thinking there might be a way to do this w/o having to query the table for the last id and incr the id before I do another insert.
 
Any help much appreciated.

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

Предыдущее
От: "Ian Harding"
Дата:
Сообщение: Re: Microsoft SQL Server Replication
Следующее
От: missive@frontiernet.net (Lee Harr)
Дата:
Сообщение: Re: pqReadData() -- backend closed the channel unexpectedly.