RETURNS SETOF Users gave me:
getuser ----------------- (cristian,hola)
----- Original Message ----- From: "Richard Huxton" <dev@xxxxxxxxxxxx>
To: "Pavel Stehule" <stehule@xxxxxxxxxxxxxxx>
Cc: "Cristian Prieto" <cristian@xxxxxxxxxxxxxxx>; <pgsql-general@xxxxxxxxxxxxxx>
Sent: Wednesday, February 23, 2005 10:34 AM
Subject: Re: 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 majordomo@xxxxxxxxxxxxxx)