opaque function not accepted (without error message)

Поиск
Список
Период
Сортировка
От Jules Alberts
Тема opaque function not accepted (without error message)
Дата
Msg-id 200208131234.g7DCY7iO030652@artemis.cuci.nl
обсуждение исходный текст
Список pgsql-general
Hello world,

(postgresql 7.2.1-5 on a completely patched redhat 7.3 box)

In my db I have a function that will be used as a trigger when updating
records.

drop function au_col();
create function au_col()
  returns opaque
  as  'begin
        new.mut_id = current_user;
        new.mut_timestamp = CURRENT_TIMESTAMP;
        return new;
      end;'
  language 'plpgsql';

All seems well, "CREATE" is echoed. Later I found out the function
wasn't in the database, \df in psql doesn't show it. After some
experimenting I found out that apparantly the return type opaque is the
evildoer. When I use an integer type:

drop function au_col();
create function au_col()
  returns integer
  as  'begin
        new.mut_id = current_user;
        new.mut_timestamp = CURRENT_TIMESTAMP;
        return 1;
      end;'
  language 'plpgsql';

the function is created, and \df shows it. Is it impossible to create
an opaque function (according to my books this is quite possible)? Am I
doing something wrong?

TIA for any reactions!

--
Jules Alberts

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

Предыдущее
От: pginfo
Дата:
Сообщение: Very slow insert speed
Следующее
От: "Peter Gibbs"
Дата:
Сообщение: Re: opaque function not accepted (without error message)