diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-09-15 17:46:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-09-15 17:46:02 +0000 |
commit | e3171be674658f9ce1decaddae51462bfda517aa (patch) | |
tree | ed42ad78cdd2753e7c9efda11dcfdfa6fbbc1918 | |
parent | bab9f1d585b15db59ec2703adaadc3efcf3f1810 (diff) | |
download | postgresql-e3171be674658f9ce1decaddae51462bfda517aa.tar.gz |
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.
-rw-r--r-- | doc/src/sgml/release-9.0.sgml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/doc/src/sgml/release-9.0.sgml b/doc/src/sgml/release-9.0.sgml index 14761ba0a7..8ddb73fe3a 100644 --- a/doc/src/sgml/release-9.0.sgml +++ b/doc/src/sgml/release-9.0.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/release-9.0.sgml,v 2.39.2.12 2010/09/01 15:14:48 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/release-9.0.sgml,v 2.39.2.13 2010/09/15 17:46:02 tgl Exp $ --> <sect1 id="release-9-0"> <title>Release 9.0</title> @@ -436,6 +436,31 @@ <listitem> <para> + PL/pgSQL now treats selection into composite fields more consistently + (Tom Lane) + </para> + + <para> + Formerly, a statement like + <literal>SELECT ... INTO <replaceable>rec</>.<replaceable>fld</> FROM ...</literal> + was treated as a scalar assignment even if the record field + <replaceable>fld</> was of composite type. Now it is treated as a + record assignment, the same as when the <literal>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 + <command>SELECT</> list, not as a <literal>ROW(...)</> construct as in + previous versions. + </para> + + <para> + If you need to do this in a way that will work in both 9.0 and previous + releases, you can write something like + <literal><replaceable>rec</>.<replaceable>fld</> := ROW(...) FROM ...</literal>. + </para> + </listitem> + + <listitem> + <para> Remove PL/pgSQL's <literal>RENAME</> declaration (Tom Lane) </para> |