RETURNS SETOF Users gave me:

    getuser
-----------------
(cristian,hola)

----- Original Message ----- From: "Richard Huxton" <dev@archonet.com>
To: "Pavel Stehule" <[EMAIL PROTECTED]>
Cc: "Cristian Prieto" <[EMAIL PROTECTED]>; <pgsql-general@postgresql.org>
Sent: Wednesday, February 23, 2005 10:34 AM
Subject: Re: [GENERAL] Help with a very newbie question...



Pavel Stehule wrote:
If I did the following:
SELECT * FROM "Users";
I get:

userid  | passwd
----------+--------
cristian | hola

AND I execute:
SELECT getuser('cristian', 'hola');

I get:
    getuser
-----------------
(cristian,hola)


There are two posibilities

SELECT getuser('cristian','hola');
SELECT * FROM getuser('cristian','hola') AS (userid varchar, passwd varchar);

Or, define your function as ... RETURNS SETOF Users

--
  Richard Huxton
  Archonet Ltd




---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to