Re: improvise callbacks in plpgsql

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: improvise callbacks in plpgsql
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3417DD767@Herge.rcsinc.local
обсуждение исходный текст
Ответ на improvise callbacks in plpgsql  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Ответы Re: improvise callbacks in plpgsql
Список pgsql-performance
> The body of callit() need be little more than OidFunctionCall1()
> plus whatever error checking and security checking you want to
> include.

esp=# create table test(f text);
CREATE TABLE

esp=# create function test() returns void as
$$
    begin
        insert into test values ('called');
    end;
$$ language plpgsql;

esp=# create or replace function test2() returns void as
esp-# $$
esp$#     declare
esp$#         r record;
esp$#     begin
esp$#         select into r 'abc';
esp$#         perform callit('test()'::regprocedure, r);
esp$#     end;
esp$#
esp$# $$ language plpgsql;
CREATE FUNCTION

esp=# select test2();

esp=# select * from test;
   f
--------
 called
(1 row)

one word...
w00t

Merlin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: improvise callbacks in plpgsql
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: improvise callbacks in plpgsql