pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Rhys Stewart <rhys.stewart@gmail.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: set returning functions.
Date: Tue, 25 Sep 2007 06:46:35 +0200
Message-ID: <162867790709242146m70791358gfe2a9045b6512ece@mail.gmail.com> (raw)
In-Reply-To: <189966030709241618p1f104e2ep55a9f8f5725ef90@mail.gmail.com>
References: <189966030709211129t7147b726w25f415489f25b874@mail.gmail.com>
	<162867790709241509k16bbe691v94c9ef2748fbbba@mail.gmail.com>
	<dcc563d10709241601y785a6c77r28a349d204b3e2d4@mail.gmail.com>
	<189966030709241618p1f104e2ep55a9f8f5725ef90@mail.gmail.com>

2007/9/25, Rhys Stewart <rhys.stewart@gmail.com>:
> yes indeed. thats exactly it scott!!!
>
> On 9/24/07, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> > On 9/24/07, Pavel Stehule <pavel.stehule@gmail.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



view thread (9+ messages)  latest in thread

Message-ID: <162867790709242146m70791358gfe2a9045b6512ece@mail.gmail.com>
Permalink:  ../162867790709242146m70791358gfe2a9045b6512ece@mail.gmail.com/
Also on:    postgresql.org/message-id/162867790709242146m70791358gfe2a9045b6512ece@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: pavel.stehule@gmail.com, rhys.stewart@gmail.com, scott.marlowe@gmail.com
  Subject: Re: set returning functions.
  In-Reply-To: <162867790709242146m70791358gfe2a9045b6512ece@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox