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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Oleg Bartunov" <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] SELECT FOR UPDATE in (PL/pgSQL) function
Date: 1999-07-28 14:19:40
Message-ID: 9752.933171580@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)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

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-07-28 14:34:56 Re: [PORTS] RedHat6.0 & Alpha
Previous Message Tom Lane 1999-07-28 14:16:47 Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)