From: | Holger Krug <hkrug(at)rationalizer(dot)com> |
---|---|
To: | "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: bug or my ignorance ? |
Date: | 2001-12-11 14:51:50 |
Message-ID: | 20011211155150.A13501@dev12.rationalizer.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Dec 11, 2001 at 09:26:31AM -0500, Robert B. Easter wrote:
> Anyhow, you are returning a T in your functions, so all you will get out of
> them is a number of type ::T which you will not be able to do anything with
> except select it. Trying to access the members of a T using dot won't work.
> The number cannot even be cast to an oid or any other data type (the cast
> functions don't even understand how to do anything with table types).
Thank you for your answer. I learnt a lot from it. But in one main
point it seems as if you're wrong. Look:
=>CREATE FUNCTION testfun() RETURNS T AS '
'>SELECT 13::int8 as id, ''your name''::text as name;' LANGUAGE sql;
This works, hence I can do something with a number of type ::T :
=>select name( testfun() );
But this does not work, hence I cannot do anything with a number of type ::T :
=>select name(r.a) from (select testfun() as a) as r;
ERROR: fmgr_info: function 137857576: cache lookup failed
What's the difference between those both cases ?
--
Holger Krug
hkrug(at)rationalizer(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-12-11 15:02:58 | Re: Problem with indexes |
Previous Message | Heather Johnson | 2001-12-11 14:47:41 | Re: problems doing sub-selects on PostgreSQL 7.1.3 and Solaris 7 |