Thread: [Fwd: Re: SELECT INTO an array]
Though I don't want to do a full select (the table has very many fields and some of them hold a lot of values). a. Josh Berkus wrote: > Alberto, > > >>I'm trying to write a PLPGSQL Function using an array as an internal >>variable, but I don't seem to succeed: >> >>CREATE FUNCTION ... RETURNS ... AS ' >>DECLARE >> l_record integer[2]; >>BEGIN >> SELECT INTO l_record col01, col02 FROM table01 WHERE ...; > > > You don't want an array for the above. You want a RECORD. > > -Josh > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > > -- Alberto Bolchini mailto:alberto@melloni49.it PGP/GnuPG key: 1024D/61B602FA Fingerprint: 60E8 FE24 ADFA 486D 6F61 C14B D322 482F 61B6 02FA Key available at: http://www.keyserver.net -- Alberto Bolchini mailto:alberto@melloni49.it PGP/GnuPG key: 1024D/61B602FA Fingerprint: 60E8 FE24 ADFA 486D 6F61 C14B D322 482F 61B6 02FA Key available at: http://www.keyserver.net