Search Postgresql Archives

Re: SPI_exec() + PG_TRY/PG_CATCH

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

 



"Aleksandrs Vinogradovs" <avinogradovs@xxxxxxxxxxxxxxxx> writes:
> How do I handle SPI errors properly without rethrowing them or
> using subtransactions ?

Those are your only two choices.

> My current code works (simple PG_CATCH()
> with resseting of error state), but reports reference leaks for
> every failed SPI_exec() call...

The warnings are the least of your worries.  Without a subxact abort,
there is all sorts of state that has not been properly cleaned up.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[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