Re: @@IDENTITY (Was: Access - ODBC - serial problem)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: @@IDENTITY (Was: Access - ODBC - serial problem)
Дата
Msg-id 11775.1081790876@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: @@IDENTITY (Was: Access - ODBC - serial problem)  ("scott.marlowe" <scott.marlowe@ihs.com>)
Ответы LOG: unexpected EOF on client connection  (Chris Gamache <cgg007@yahoo.com>)
Список pgsql-odbc
"scott.marlowe" <scott.marlowe@ihs.com> writes:
> [ use ORDER BY ... LIMIT instead of MAX ]

> However, I think you have to be in serializable transaction mode for that
> code to be gauranteed not to get the wrong data.  But I'm not certain on
> that one.

Yes, you need serializable mode with *either* method to ensure you see
your own row, and not one inserted later by another transaction that
managed to commit before you.  The ORDER BY trick is just to get around
Postgres' inability to connect MAX() to indexes; it doesn't affect the
transactional semantics at all.

            regards, tom lane

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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: @@IDENTITY (Was: Access - ODBC - serial problem)
Следующее
От: Chris Gamache
Дата:
Сообщение: LOG: unexpected EOF on client connection