Re: function returning a setof a column type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Murat Tasan <murat(dot)tasan(at)cwru(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: function returning a setof a column type
Date: 2006-01-31 18:53:10
Message-ID: 5590.1138733590@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Murat Tasan <murat(dot)tasan(at)cwru(dot)edu> writes:
> => CREATE FUNCTION test_function() RETURNS SETOF table.column%TYPE AS
> $$ SELECT 1; $$ LANGUAGE SQL;
> ERROR: syntax error at or near "%" at character 59

This seems to be an oversight in the grammar: that combination simply
isn't handled. I'll see about fixing it for 8.2, but for the moment
you're just stuck with not using %TYPE and SETOF together :-(

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Darren R 2006-01-31 19:56:01 subscribe-digest
Previous Message Tom Lane 2006-01-31 15:48:10 Re: