Re: URL Managment - C Function help - Mailing list pgsql-hackers

From Tom Lane
Subject Re: URL Managment - C Function help
Date
Msg-id 28761.1256139736@sss.pgh.pa.us
Whole thread Raw
In response to URL Managment - C Function help  (Samuel ROZE <samuel.roze@gmail.com>)
Responses Re: URL Managment - C Function help
Re: URL Managment - C Function help
List pgsql-hackers
Samuel ROZE <samuel.roze@gmail.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


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Application name patch - v2
Next
From: Heikki Linnakangas
Date:
Subject: Re: URL Managment - C Function help