Search Postgresql Archives

Re:

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

 



Vincas Dargis <vindrg@xxxxxxxxx> writes:
> I am experimenting with user defined functions in C, though I have
> problem with stability.

The only obvious problem in what you posted is

>        command = "SELECT 1";
> ...
>        pfree(command);

pfree'ing a constant is pretty much guaranteed to crash.
I am guessing the reason you don't see "5" printed is that
the if() fails, though it's not obvious why.

More generally, instead of putting an elog every two lines,
I'd suggest expending the effort to learn to use a debugger.
Having something that actually traps at the point of a crash
is a lot more useful than trying to triangulate on the problem
between inserted prints.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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