Re: Help with a very newbie question...

From: "Cristian Prieto" <cristian(at)clickdiario(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with a very newbie question...
Date: 2005-02-23 16:43:13
Message-ID: 02bf01c519c6$c812c720$6e00a8c0@gt.ClickDiario.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

RETURNS SETOF Users gave me:

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

----- Original Message -----
From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Pavel Stehule" <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
Cc: "Cristian Prieto" <cristian(at)clickdiario(dot)com>;
<pgsql-general(at)postgresql(dot)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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-02-23 16:47:13 Re: Recovering db from cracked server
Previous Message Richard Huxton 2005-02-23 16:34:19 Re: Help with a very newbie question...