Re: LIBPQ Exception

Поиск
Список
Период
Сортировка
От Rodrigo De León
Тема Re: LIBPQ Exception
Дата
Msg-id a55915760712120907h339e08c5xc3bb0b59c8fad90b@mail.gmail.com
обсуждение исходный текст
Ответ на LIBPQ Exception  ("Abraham, Danny" <danny_abraham@bmc.com>)
Список pgsql-general
On Dec 12, 2007 7:36 AM, Abraham, Danny <danny_abraham@bmc.com> wrote:
> Any other alternative?

There are no anonymous blocks in PostgreSQL:

You could try creating a function:

create or replace function
  shootmyselfinthefoot()
returns boolean as
$$
declare
  (...);
begin
  execute 'SOME DML HERE';
  execute 'SOME MORE DML HERE';
  execute 'ETC.';
  (...)
  exception when others then
    -- whatever...
end;
$$ language plpgsql;

... and call that from your C program.

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: General Q's
Следующее
От: Dave Page
Дата:
Сообщение: Re: General Q's