Re: have you feel anything when you read this ?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: have you feel anything when you read this ?
Дата
Msg-id 20060405071322.Y58168@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: have you feel anything when you read this ?  ("Eugene E." <sad@bankir.ru>)
Ответы Re: have you feel anything when you read this ?  ("Eugene E." <sad@bankir.ru>)
Список pgsql-sql
On Wed, 5 Apr 2006, Eugene E. wrote:

> Stephan Szabo wrote:
> > On Tue, 4 Apr 2006, Eugene E. wrote:
> >
> >
> >>Stephan Szabo wrote:
> >>
> >>>On Fri, 31 Mar 2006, Eugene E. wrote:
> >>>
> >>>
> >>>
> >>>>Peter Eisentraut wrote:
> >>>>
> >>>>
> >>>>>Eugene E. wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>the problem is: you'll get this four byte sequence '\000' _instead_
> >>>>>>of NUL-byte anyway.
> >>>>>
> >>>>>
> >>>>>What you seem to be missing is that PostgreSQL data can be represented
> >>>>>in textual and in binary form.  What you in psql is the textual form.
> >>>>>If you want the binary form you need to select it.  Then you can pass
> >>>>>the exact bytes back and forth.
> >>>>
> >>>>your sentence is not true.
> >>>>I can not select exact bytes even if i use BYTEA type
> >>>
> >>>
> >>>No, that is still using the textual form.  If you use PQexecParams and set
> >>>the last argument to show you want binary data, you should get binary
> >>>data.
>
> ok
> then i am using PQexecParams
>
> the following tiny program shows a wonderful lameness...

What lameness? The fact that you're trying to use a binary (network order
maybe) integer as a string? That's not the fault of PQexecParams but
of the code calling it.

It'd be nice for ease of use to be able to say, give me this
column (the integer) as a string and this column (the bytea) as binary,
especially as the commentary implies that the protocol supports it. But as
I said before, that's a separate discussion from whether or not Peter's
claim that it's possible to get binary data is false.


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

Предыдущее
От: "Eugene E."
Дата:
Сообщение: Re: have you feel anything when you read this ?
Следующее
От: Michael Burke
Дата:
Сообщение: SELECT composite type