Re: variables in ad hoc queries - Mailing list pgsql-general

From Brian Modra
Subject Re: variables in ad hoc queries
Date
Msg-id 5a9699850909290530w2fbf34e6n6d3e118239958af0@mail.gmail.com
Whole thread Raw
In response to variables in ad hoc queries  (Iain Barnett <iainspeed@gmail.com>)
Responses Re: variables in ad hoc queries
List pgsql-general
2009/9/29 Iain Barnett <iainspeed@gmail.com>:
> If I have a function that returns an integer, how can I use the following
> code outside of a function block?
>
> declare
> _myint int;
>
> begin
> _myint := myfunction( );
> end;
>

select myfunction from myfunction();

or, you can use the function in SQLs wherever you'd usually use an integer

> or is it just not possible?
>
> Iain
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



--
Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa
http://www.zwartberg.com/

pgsql-general by date:

Previous
From: Brian Modra
Date:
Subject: Re: query is taking longer time after a while
Next
From: Merlin Moncure
Date:
Subject: Re: Delphi connection ?