Re: [NOVICE] Last ID Problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [NOVICE] Last ID Problem
Дата
Msg-id 6531.1107378267@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [NOVICE] Last ID Problem  (Greg Stark <gsstark@mit.edu>)
Ответы Re: [NOVICE] Last ID Problem  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> This is from the DBI documentation -- that is, the non-driver-specific
> abstract interface documentation.

>            Returns a value 'identifying' the row just inserted, if possible.
>            Typically this would be a value assigned by the database server to
>            a column with an auto_increment or serial type.

Aside from the numerous serious problems pointed out in the
documentation, this has an even more fatal objection, which is that it's
unspecified what the result value is and thus there is no portable way
of *using* the result after you have it.  (If the PG driver returns an
OID you certainly couldn't use that the same way as some other driver
that returns a primary key ... especially a multicolumn primary key ...)

This "portable" function is so unportable that I see no reason to
accept it as precedent.
        regards, tom lane


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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: [NOVICE] Last ID Problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump bug in 7.3.9 with sequences