Re: set returning functions.

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Rhys Stewart" <rhys(dot)stewart(at)gmail(dot)com>
Cc: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: set returning functions.
Date: 2007-09-25 04:46:35
Message-ID: 162867790709242146m70791358gfe2a9045b6512ece@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2007/9/25, Rhys Stewart <rhys(dot)stewart(at)gmail(dot)com>:
> yes indeed. thats exactly it scott!!!
>
> On 9/24/07, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> > On 9/24/07, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> > > Hello Rhys
> > >
> > > its not mystery
> >
> > Yeah, but I think he wanted to be able to make his own function he
> > could call like:
> >
> > select myfunc(10);
> >

Then you have to use sql language

create or replace function mysrf(int)
returns setof integer as $$
select i from generate_series(1, $1) g(i);
$$ language sql;

Regards
Pavel Stehule

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2007-09-25 04:56:12 Re: Why the ERROR: duplicate key violates uniqueconstraint "master_pkey" is raised? - Is this a Bug?
Previous Message Anoo Sivadasan Pillai 2007-09-25 04:36:24 Re: Why the ERROR: duplicate key violates uniqueconstraint "master_pkey" is raised? - Is this a Bug?