Re: How to return SETOF RECORD?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Torsten Zühlsdorff <foo(at)meisterderspiele(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to return SETOF RECORD?
Date: 2009-05-04 15:28:22
Message-ID: 162867790905040828n61d14b56r13824299b6570ed2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

http://www.postgres.cz/index.php/PL/pgSQL_(en)#Functions_which_return_tables

regards
Pavel Stehule

2009/5/4 Torsten Zühlsdorff <foo(at)meisterderspiele(dot)de>:
> Hello,
>
> i'm writting some functions for parsing urls and handling strings. But i
> have problems with the result set.
>
> I already figured out how to return a single record/row. But i need more. A
> good example for what i want is ts_debug();
>
> cse=> SELECT alias, token from
> ts_debug('http://www.postgresql.org/docs/index.html');
>  alias   |               token
> ----------+------------------------------------
>  protocol | http://
>  url      | www.postgresql.org/docs/index.html
>  host     | www.postgresql.org
>  url_path | /docs/index.html
>
>
> I try to get an output like that:
> cse=> SELECT alias, token from
> parse_uri('http://www.postgresql.org/docs/index.html');
>  alias   |               token
> ----------+------------------------------------
>  scheme   | http://
>  url      | www.postgresql.org/docs/index.html
>  host     | www.postgresql.org
>  path     | /docs/
>  file     | index.html
>
> But i never get more than one row return. I need a hint how i can return
> more than one row. Or even better: a littel example ;)
>
> Thanks very much and greetings from Germany,
> Torsten
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message DaNieL 2009-05-04 16:27:30 PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query
Previous Message Dan Armbrust 2009-05-04 13:51:41 Re: recover corrupt DB?