Re: [NOVICE] Last ID Problem

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [NOVICE] Last ID Problem
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A75FF@Herge.rcsinc.local
обсуждение исходный текст
Список pgsql-hackers
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> "INSERT/UPDATE ... RETURNING" isn't something a driver can take
advantage
> of.
> It would require it to modify your statements which it can't do
safely. So
> your application would have such non-portable SQL code written into
it.
> Switch
> databases and your application code needs to be ported.

I really don't think it matters.  Currently, in PostgreSQL, there is
only 'one true way' to have a real unique identifier for any given tuple
that is persistent across queries and this is a sequence.  Since
sequences are basically managed by the app, your driver (I'm assuming)
can't reliably use them.

This is kind of similar to the issues being talked about wrt user locks.
Because the lack of a true persistent tuple identifier, they require
some data to be passed to them from the app (not really a big deal for
them, however).

From the point of view of your driver, the real solution is to bump oid
to 64 bits and un-deprecate it.

Merlin


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

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Enhancement suggestion
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [NOVICE] Last ID Problem