bug or my ignorance ?

Поиск
Список
Период
Сортировка
От Holger Krug
Тема bug or my ignorance ?
Дата
Msg-id 20011211142003.A13247@dev12.rationalizer.com
обсуждение исходный текст
Ответы Re: bug or my ignorance ?  ("Robert B. Easter" <reaster@comptechnews.com>)
Re: bug or my ignorance ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
    The versions of PostgreSQL I used:
    * CVS of Dec. 11, virgin installation without any further changes
    * 7.1.3

I have simple SQL functions `testfun()' and `testfun1()' returning values
of the type of relation `T':

  =>CREATE TABLE T ( id int8, name text );

  =>insert into T VALUES ( 15, 'my name' );

  =>CREATE FUNCTION testfun() RETURNS T AS '
  '>SELECT 13::int8 as id, ''your name''::text as name;' LANGUAGE sql;

  -- or: 'sql' for PostgreSQL 7.1.3

  =>CREATE FUNCTION testfun1() RETURNS T AS '
  '>SELECT  id,  name from T;' LANGUAGE sql;

  -- or: 'sql' for PostgreSQL 7.1.3

Now I try to call the first function and return the values to the user:

  =>select name(r.a) from (select testfun() as a) as r;
  ERROR:  fmgr_info: function 137857576: cache lookup failed

Does not work. For the second function I first try a simpler call:

  => select r.a from (select testfun1() as a) as r;
       a
  -----------
   137835800
  (1 Zeile)

Works but does not help. Retrying it gives two alternating return values:

  => select r.a from (select testfun1() as a) as r;
       a
  -----------
   137857448
  (1 Zeile)

  => select r.a from (select testfun1() as a) as r;
       a
  -----------
   137835800
  (1 Zeile)

  => select r.a from (select testfun1() as a) as r;
       a
  -----------
   137857448
  (1 Zeile)

Now lets look if can return the result of the second function to the
user:

  =>select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137835928: cache lookup failed
  => select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137857576: cache lookup failed
  =>select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137835928: cache lookup failed
  => select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137857576: cache lookup failed
  =>select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137835928: cache lookup failed
  => select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137857576: cache lookup failed
  =>select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137835928: cache lookup failed
  => select name(r.a) from (select testfun1() as a) as r;
  ERROR:  fmgr_info: function 137857576: cache lookup failed

Unfortunately I cannot.

Is this a sign of insufficient experience from my side or a real bug ?

--
Holger Krug
hkrug@rationalizer.com

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

Предыдущее
От: "Raymond O'Donnell"
Дата:
Сообщение: Can't pg_dump
Следующее
От: Colm McCartan
Дата:
Сообщение: Re: RedHat6.2 - postgres 7.1.2 lib confusion