Felix E. Klee wrote:
> I have the created a C-Language function (code is below). Now, I
> wonder: How do I handle exceptions, for example if malloc cannot assign
> the necessary memory? Do "palloc" and "pfree" handle such a case
> cleanly?
Yes -- they will roll back the current transaction on if there is no
memory available. You can catch the error via PG_TRY() in 8.0, although
in the case of OOM there isn't probably a lot your exception handler
could do...
-Neil