Re: Returning RECORD from PGSQL without custom type?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, dante(at)larkspark(dot)com, Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Returning RECORD from PGSQL without custom type?
Date: 2008-05-12 17:58:55
Message-ID: 23130.1210615135@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"D. Dante Lorenso" <dante(at)lorenso(dot)com> writes:
> I'd like to be able to do this:
>
> CREATE OR REPLACE FUNCTION "my_custom_func" (in_value bigint)
> RETURNS SETOF (col1name BIGINT, col2name TEXT, ...) AS

You realize of course that you can do this *today* if you use OUT
parameters?

CREATE OR REPLACE FUNCTION "my_custom_func" (in_value bigint,
OUT col1name BIGINT, OUT col2name TEXT, ...)
RETURNS SETOF RECORD AS

The TABLE syntax is a bit more standards-compliant maybe, but it's not
offering any actual new functionality.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2008-05-12 18:07:09 Re: rounding problems
Previous Message Justin 2008-05-12 17:48:16 rounding problems