Re: 8.1, OID's and plpgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.1, OID's and plpgsql
Дата
Msg-id 9093.1133567919@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 8.1, OID's and plpgsql  ("Jim C. Nasby" <jim@nasby.net>)
Ответы Re: 8.1, OID's and plpgsql  ("Jim C. Nasby" <jim@nasby.net>)
Re: 8.1, OID's and plpgsql  ("Jim C. Nasby" <jim@nasby.net>)
Re: 8.1, OID's and plpgsql  ("Uwe C. Schroeder" <uwe@oss4u.com>)
Список pgsql-general
"Jim C. Nasby" <jim@nasby.net> writes:
> Maybe the docs should be changed to just say that you should never reuse
> a ctid outside of the transaction you obtained the ctid in?

That's not a sufficient rule either: someone else could still delete or
update the row while your transaction runs.  You'd really have to SELECT
FOR UPDATE or FOR SHARE to be sure the ctid remains stable.  (Of course,
this isn't an issue for the case of a row you just inserted yourself,
since no one else can see it yet to change it.)

The paragraph defining ctid is not the place for a discussion of how it
could be used ... I'm not quite sure where is, though.

            regards, tom lane

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

Предыдущее
От: Gary Horton
Дата:
Сообщение: Re: createuser ignores stdin in 8.1.0?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits