Can I view a RECORD returned from a PL/pgSQL function in psql?

From: Charles Christiansen <charleschr(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Can I view a RECORD returned from a PL/pgSQL function in psql?
Date: 2003-05-27 21:13:46
Message-ID: 20030527211346.50992.qmail@web21204.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I'm trying to figure out if I can return a record from
a PL/pgSQL function. I created this function:

CREATE OR REPLACE FUNCTION LOGIN_TEST(VARCHAR,VARCHAR)
RETURNS RECORD

and got no errors, so it looks like I am allowed to
create the function alright. When I try to execute
this function from psql like this:

select LOGIN_TEST(myuser,mypass);

I get a message saying "ERROR: Cannot display a value
of type RECORD". Is there any tool available that
will let me view a RECORD returned from a PL/pgSQL
function?

Also, is it possible to return multiple values from a
PL/pgSQL function, something like this:

CREATE OR REPLACE FUNCTION LOGIN_TEST(VARCHAR,VARCHAR)
RETURNS VARCHAR,VARCHAR,INTEGER

Thanks for any help or pointers to any parts of TFM I
should read to figure this out on my own :).

Chuck.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Browse pgsql-novice by date

  From Date Subject
Next Message Molenda, Mark P 2003-05-27 21:40:52 Re: PHP vs Cold Fusion vs Zope
Previous Message Ewald Geschwinde 2003-05-27 20:38:07 Re: PHP vs Cold Fusion vs Zope