Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: set returning functions.



On 9/24/07, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 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;

Do you HAVE to use sql plsql to get this to work?  I thought that all
pl languages worked like this with pgsql.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group