Samuel ROZE <samuel(dot)roze(at)gmail(dot)com> writes:
> The problem is that they don't work fine... :/
I think the problem is that you are passing C strings to code that
expects pointers to text datums --- which are not the same thing
at all. (text has a length word, not a null terminator byte.)
It's pure accident that your first example works, and entirely
unsurprising that the second one doesn't. Some CStringGetTextDatum
calls might help.
regards, tom lane