Re: [HACKERS] SELECT FOR UPDATE in (PL/pgSQL) function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] SELECT FOR UPDATE in (PL/pgSQL) function
Дата
Msg-id 9752.933171580@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: [HACKERS] SELECT FOR UPDATE in (PL/pgSQL) function  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
>> ERROR:  query didn't return correct # of attributes for *internal*

> AFAIC,"SELECT FOR UPDATE" always causes above errors in
> PL/pgSQL functions.

> ORDER/GROUP BY items that are not in the targetlist also cause
> same errors in PL/pgSQL functions.
> In both cases,target entries are added which are not wanted in the
> final projected tuple(SELECT FOR UPDATE adds "ctid" entry).

It sounds like the code that deals with the resulting tuple is not
smart enough to ignore resjunk attributes (or to call ExecProject
if it needs an actual junk-free tuple).  That's probably an easily
fixed bug, but I'm not familiar with the PL code...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)
Следующее
От: Bernard Frankpitt
Дата:
Сообщение: Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple select)