Обсуждение: 3.0 fe/be protocol bug?

Поиск
Список
Период
Сортировка

3.0 fe/be protocol bug?

От
John DeSoi
Дата:
I'm working on a new client with the 3.0 protocol. I'm having a problem 
with the data DataRow message from this select:

select oid, datconfig from pg_database

There seems to be a problem with text[] type for datconfig. The hex 
dump (from tcpflow) for 1 data row message is:

44 0000 0013 0002 0000 0005 3137303632 FFFF FFFF
D  mesg len  2col col1 len5 oid 17602  len col2 here?


After FFFF FFFF the next DataRow message starts.

I'm using "PostgreSQL 7.4devel on powerpc-apple-darwin6.6, compiled by 
GCC gcc (GCC) 3.1 20020420 (prerelease)" downloaded from cvs this past 
weekend.

Thanks,

John DeSoi, Ph.D.



Re: 3.0 fe/be protocol bug?

От
Tom Lane
Дата:
John DeSoi <jd@icx.net> writes:
> I'm working on a new client with the 3.0 protocol. I'm having a problem 
> with the data DataRow message from this select:

> select oid, datconfig from pg_database

> There seems to be a problem with text[] type for datconfig. The hex 
> dump (from tcpflow) for 1 data row message is:

> 44 0000 0013 0002 0000 0005 3137303632 FFFF FFFF
> D  mesg len  2col col1 len5 oid 17602  len col2 here?

Looks fine to me.  -1 length means a NULL.
        regards, tom lane


Re: 3.0 fe/be protocol bug?

От
John DeSoi
Дата:
On Wednesday, May 28, 2003, at 07:56 PM, Tom Lane wrote:
>
>> 44 0000 0013 0002 0000 0005 3137303632 FFFF FFFF
>> D  mesg len  2col col1 len5 oid 17602  len col2 here?
>
> Looks fine to me.  -1 length means a NULL.
>

Duh. I had a test for -1, but I was reading the length as an unsigned 
integer. I'd have to wait a while for 4 billion bytes :).

BTW, very nice job on the 3.0 protocol. Very clean and pretty 
straightforward to implement.

Thanks for your help,

John DeSoi, Ph.D.