[GENERAL] C function returns null values

2011-07-15 Thread Gregor Trefs
Hello all, I developed a C function which returns a record. The record contains 3 scalar values and 2 arrays. Randomly some record elements are null and I wonder why. I could trace down the problem to the point where the return record is created. Until this point everything is computed correctl

Re: [GENERAL] C function returns null values

2011-07-18 Thread Gregor Trefs
Thanks for your answer. I edited my code, but still get these random null values. What else can I do ? Regards -Ursprüngliche Nachricht- Von: Tom Lane [mailto:t...@sss.pgh.pa.us] Gesendet: Freitag, 15. Juli 2011 16:24 An: Gregor Trefs Cc: pgsql-general@postgresql.org Betreff: Re

Re: [GENERAL] C function returns null values

2011-07-18 Thread Gregor Trefs
] Gesendet: Montag, 18. Juli 2011 16:33 An: Gregor Trefs Cc: pgsql-general@postgresql.org Betreff: Re: [GENERAL] C function returns null values Gregor Trefs writes: > Thanks for your answer. I edited my code, but still get these random null > values. What else can I do ? Mph ... you&#x

Re: [GENERAL] C function returns null values

2011-07-19 Thread Gregor Trefs
Finally I got it working. You were right Tom Lane. I actually did not copy the corrected source file onto the server and thus still had this "mysterious" failure. So, palloc0 is the solution. Thanks again. Regards, Gregor Trefs -Ursprüngliche Nachricht- Von: pgsql-