Re: Composite Keys

Поиск
Список
Период
Сортировка
От RPK
Тема Re: Composite Keys
Дата
Msg-id 9164794.post@talk.nabble.com
обсуждение исходный текст
Ответ на Re: Composite Keys  (Jorge Godoy <jgodoy@gmail.com>)
Ответы Re: Composite Keys  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Jorge,

For other tables I have ID field which is incremented by sequence. But for
this table, there is not ID field. Receipt No will be incremented by finding
the max value from the existing Receipt Nos. corresponding to that Book No.
This case has a drawback as compared to the sequences in other tables.
Sequences are automatically handled by the database if two users
simultaneously enter data. But for the Receipts table where there is no need
to define a sequence, one user will find the Max(ReceiptNo) and type in the
rest of the entries. So there is a chance that in the meantime another user
on a different machine will also get the same max(ReceiptNo) until the
record of the previous user gets saved.

So how to solve this problem?
--
View this message in context: http://www.nabble.com/Composite-Keys-tf3282722.html#a9164794
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Reid Thompson
Дата:
Сообщение: Re: proper export table to csv? multilineproblem.
Следующее
От: "Anton Melser"
Дата:
Сообщение: stored procedure optimisation...