diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-21 22:06:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-21 22:06:36 +0000 |
commit | 1f74045675156f9e1dea4f66932ddf0a58180936 (patch) | |
tree | d9464710b2d87dd23ec0e6096e471cab1cacea8a /doc/src | |
parent | 08b798e2ba6314b8a5bc520487802c5e4d81efa1 (diff) |
Fix coredump problem in plpgsql's RETURN NEXT. When a SELECT INTO
that's selecting into a RECORD variable returns zero rows, make it
assign an all-nulls row to the RECORD; this is consistent with what
happens when the SELECT INTO target is not a RECORD. In support of
this, tweak the SPI code so that a valid tuple descriptor is returned
even when a SPI select returns no rows.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/spi.sgml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml index e25c2a259cc..98916b24519 100644 --- a/doc/src/sgml/spi.sgml +++ b/doc/src/sgml/spi.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v 1.23 2002/09/02 06:11:42 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v 1.23.2.1 2003/01/21 22:06:36 tgl Exp $ --> <Chapter id="spi"> @@ -476,7 +476,7 @@ You may pass multiple queries in one string or query string may be The actual number of tuples for which the (last) query was executed is returned in the global variable SPI_processed (if not <ReturnValue>SPI_OK_UTILITY</ReturnValue>). - If <ReturnValue>SPI_OK_SELECT</ReturnValue> is returned and SPI_processed > 0 then you may use global + If <ReturnValue>SPI_OK_SELECT</ReturnValue> is returned then you may use global pointer SPITupleTable *SPI_tuptable to access the result tuples. </Para> @@ -517,7 +517,7 @@ You may pass multiple queries in one string or query string may be <TITLE>Structures </TITLE> <Para> - If <ReturnValue>SPI_OK_SELECT</ReturnValue> is returned and SPI_processed > 0 then you may use the global + If <ReturnValue>SPI_OK_SELECT</ReturnValue> is returned then you may use the global pointer SPITupleTable *SPI_tuptable to access the selected tuples. </Para> |