This patch clarifies the usage of references in PL/Perl :)
authorBruce Momjian
Fri, 15 Oct 2004 16:51:48 +0000 (16:51 +0000)
committerBruce Momjian
Fri, 15 Oct 2004 16:51:48 +0000 (16:51 +0000)
David Fetter

doc/src/sgml/plperl.sgml

index 342da3ba5cf2414a845fe77d432374f86925f712..7d76b4fc032ffc08f2222d599a6d0245ebadece9 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -260,7 +260,9 @@ composite types.
   
 
   
-   Here is an example of a PL/Perl function returning a rowset of a row type:
+   Here is an example of a PL/Perl function returning a rowset of a
+   row type.  Note that a composite type is always represented as a
+   hash reference.
 
 CREATE TABLE test (
        i int,
@@ -305,7 +307,10 @@ $$ LANGUAGE plperl;
   
 
   
-  Here is an example of a PL/Perl function returning a rowset of a composite type.
+  Here is an example of a PL/Perl function returning a rowset of a
+composite type.  As a rowset is always a reference to an array
+and a composite type is always a reference to a hash, a rowset of a
+composite type is a reference to an array of hash references.
   
 CREATE TYPE testsetperl AS (f1 integer, f2 text, f3 text);