From e1089e34eb7625332a4e594cc50186a5233dc2b3 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 15 Sep 2010 17:45:57 +0000 Subject: [PATCH] Add a compatibility note about plpgsql's treatment of SELECT INTO rec.fld when fld is of composite type. Per discussion of bug #5644 from Valentine Gogichashvili. --- doc/src/sgml/release-9.0.sgml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/release-9.0.sgml b/doc/src/sgml/release-9.0.sgml index 7bfdf1419b0..6d29ddd1e93 100644 --- a/doc/src/sgml/release-9.0.sgml +++ b/doc/src/sgml/release-9.0.sgml @@ -1,4 +1,4 @@ - + Release 9.0 @@ -434,6 +434,31 @@ + + + PL/pgSQL now treats selection into composite fields more consistently + (Tom Lane) + + + + Formerly, a statement like + SELECT ... INTO rec.fld FROM ... + was treated as a scalar assignment even if the record field + fld was of composite type. Now it is treated as a + record assignment, the same as when the INTO target is a + regular variable of composite type. So the values to be assigned to the + field's subfields should be written as separate columns of the + SELECT list, not as a ROW(...) construct as in + previous versions. + + + + If you need to do this in a way that will work in both 9.0 and previous + releases, you can write something like + rec.fld := ROW(...) FROM .... + + + Remove PL/pgSQL's RENAME declaration (Tom Lane) -- 2.30.2