Schemas not available for pl/pgsql %TYPE....

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Schemas not available for pl/pgsql %TYPE....
Date: 2002-09-04 21:53:18
Message-ID: 20020904215317.GK59269@ninja1.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Call me crazy, but shouldn't the following work? :~|

CREATE FUNCTION t() RETURNS TEXT AS '
DECLARE
col_name pg_catalog.pg_attribute.attname%TYPE;
BEGIN
col_name := ''uga'';
RETURN col_name;
END;
' LANGUAGE 'plpgsql';
CREATE FUNCTION

SELECT t();
WARNING: plpgsql: ERROR during compile of t near line 2
ERROR: Invalid type name 'pg_catalog.pg_attribute.attname % TYPE'

-sc

--
Sean Chittenden

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-09-04 22:16:00 Re: Schemas not available for pl/pgsql %TYPE....
Previous Message Stephan Szabo 2002-09-04 21:42:05 Re: Bug #757: ODBC Doesn works

Browse pgsql-hackers by date

  From Date Subject
Next Message Olivier PRENANT 2002-09-04 21:59:20 Re: Bug in Makefile.shlib
Previous Message Stephan Szabo 2002-09-04 21:51:30 Re: locking of referenced table during constraint construction