Re: bug or my ignorance ?

Поиск
Список
Период
Сортировка
От Holger Krug
Тема Re: bug or my ignorance ?
Дата
Msg-id 20011211155150.A13501@dev12.rationalizer.com
обсуждение исходный текст
Ответ на Re: bug or my ignorance ?  ("Robert B. Easter" <reaster@comptechnews.com>)
Список 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@rationalizer.com

В списке pgsql-general по дате отправления:

Предыдущее
От: wsheldah@lexmark.com
Дата:
Сообщение: Re: Need SQL help, I'm stuck.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem with indexes