Function multiple results returns

From: "Maxim" <maxik(at)e-foto(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: Function multiple results returns
Date: 2001-10-02 19:17:17
Message-ID: 9pd3jt$lpf$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'am sorry.
Last line a mistake.

> Example:
>
> select function getmylogs (inet) returns set of mylogs
> as 'select mylogs.* from mylogs
> where $1 = mylogs.local_ip'
> language 'sql';
>
> Returns:
>
> ?column?
> --------
> 136538048
> 136538048
> 136538048
> 136538048
> 136538048
> 136538048
> 136538048
>
> etc.
>
> It not the table from database.
>
> or nex example:
>
> create function gelinvoice (int4) returns ?__?
> as ' SELECT Invoice.Num, Invoice.Date, Buyer.Name
> FROM Invoice, Buyer
> WHERE Invoice.BuyerID=Buyer.ID AND Buyer.Num-$1
> ORDER BY Buyer.Name'
> Language 'sql';
>
> What in that case it is necessary to write in ?__? ?
> Or if it is necessary to return result of select of the temporary table?

^^^^^^^^^^^^^^^^
>
> Max.
> mailto:maxik(at)e-foto(dot)ru
> http://virus.e-foto.ru
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rdack 2001-10-02 20:29:07 Re: pypgsql 'create database' problem
Previous Message Maxim 2001-10-02 19:14:21 Function multiple results returns