Can I view a RECORD returned from a PL/pgSQL function in psql?
Can I view a RECORD returned from a PL/pgSQL function in psql?
От:
Charles Christiansen <charleschr@yahoo.com>
Дата:
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