Re: Question on libpq parameters

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Question on libpq parameters
Дата
Msg-id b42b73150812010621v18ce5abdl6ef402f190102716@mail.gmail.com
обсуждение исходный текст
Ответ на Install question on Mac Leopard Server 10.5  (Steve Henry <steve@sdmacit.com>)
Список pgsql-general
On Mon, Dec 1, 2008 at 12:10 AM, Owen Hartnett <owen@clipboardinc.com> wrote:
> At 1:26 PM -0500 11/30/08, Tom Lane wrote:
>>
>> Owen Hartnett <owen@clipboardinc.com> writes:
>>>
>>>  Yes, it did.  I'm confused.  My first parameter is a string, but the
>>>  following two are integers.  I thought the paramType parameter
>>>  indicated the type.  Do the integers need to be sprintf'd to strings?
>>
>> Yes.
>>
>> Alternatively, you could pass the integers as binary, but that's not
>> notation-free either (you need htonl or some such).
>>
>>                        regards, tom lane
>
> Thanks, that did it. I got confused with the binary parameters, and
> PQgetvalue returning the binary through a char * when it returns a binary
> value.

you may want to check out libpqtypes:
http://libpqtypes.esilo.com/
http://pgfoundry.org/projects/libpqtypes/

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: elekis
Дата:
Сообщение: Re: Cannot open include file: 'nodes/nodes.h'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Cannot open include file: 'nodes/nodes.h'