Re: PLPGSQL bug in implicit SELECT - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PLPGSQL bug in implicit SELECT
Date
Msg-id 16126.997991748@sss.pgh.pa.us
Whole thread Raw
In response to PLPGSQL bug in implicit SELECT  (Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>)
List pgsql-hackers
Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> Unfortunately I'm getting
> testdb=# select testfunc();
> ERROR:  query "SELECT  column1 FROM table WHERE column2 LIKE '%anything%'
> ORDER BY column3 LIMIT 1" returned more than one column

This appears fixed in current sources.  I believe the relevant bugfix is:

2001-05-27 16:48  tgl
* src/: backend/executor/execJunk.c, backend/executor/execMain.c,include/executor/executor.h,
include/nodes/execnodes.h:When usinga junkfilter, the output tuple should NOT be stored back into thesame tuple slot
thatthe raw tuple came from, because that slot hasthe wrong tuple descriptor.  Store it into its own slot with
thecorrectdescriptor, instead.  This repairs problems with SPIfunctions seeing inappropriate tuple descriptors --- for
example,plpgsqlcode failing to cope with SELECT FOR UPDATE.
 
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dollar in identifiers
Next
From: Bruce Momjian
Date:
Subject: crypt and null termination