Re: URL Managment - C Function help

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: URL Managment - C Function help
Дата
Msg-id 28761.1256139736@sss.pgh.pa.us
обсуждение исходный текст
Ответ на URL Managment - C Function help  (Samuel ROZE <samuel.roze@gmail.com>)
Ответы Re: URL Managment - C Function help  (Samuel ROZE <samuel.roze@gmail.com>)
Re: URL Managment - C Function help  (Samuel ROZE <samuel.roze@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Application name patch - v2
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: URL Managment - C Function help