Re: [GENERAL] C functions, dll, server fall down

2009-12-16 Thread AlexeyChe
hm. I wonder if this is confusion between value/reference datums. Can you do a quick check to see exactly where it's crashing (either before you get into the function, at the getarg, or in the return)? you can elog(WARNING, msg) to print out debug info from inside the function. merlin It's

[GENERAL] C functions, dll, server fall down

2009-12-09 Thread AlexeyChe
Hi there Need help, I just took the example from Postgres help, code: #include postgres.h #include fmgr.h #ifdef PG_MODULE_MAGIC PG_MODULE_MAGIC; #endif PG_FUNCTION_INFO_V1(add_one); __declspec (dllexport) Datum add_one(PG_FUNCTION_ARGS) { int32 arg = PG_GETARG_INT32(0);