Search Postgresql Archives

Re: LIBPQ Exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 12, 2007 7:36 AM, Abraham, Danny <danny_abraham@xxxxxxx> 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.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux