3.0 fe/be protocol bug?

Started by John DeSoiover 22 years ago3 messages
#1John DeSoi
jd@icx.net

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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: John DeSoi (#1)
Re: 3.0 fe/be protocol bug?

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

#3John DeSoi
jd@icx.net
In reply to: Tom Lane (#2)
Re: 3.0 fe/be protocol bug?

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.