Search Postgresql Archives

Re: Startup messages for socket protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Thursday 17 Mar 2011 à 16:08:55 (+0100), Guillaume Yziquel a écrit :
> Le Thursday 17 Mar 2011 à 10:48:50 (-0400), Tom Lane a écrit :
> > Guillaume Yziquel <guillaume.yziquel@xxxxxxxxxxxx> writes:
> 
> For now, when sending \000\003\000\000 and only this, the server seems
> to disconnect. The recv() call on the socket returns 0, which should
> mean that the server has dropped the connection.

Got it:

Sent: "\000\000\000\022\000\003\000\000user\000yziquel\000\000"
Read from socket:
"R\000\000\000\b\000\000\000\000S\000\000\000\025client_encoding\000UTF8\000S\000\000\000\023DateStyle\000ISO,
DMY\000S\000\000\000\025integer_datetimes\000on\000S\000\000\000\027IntervalStyle\000postgres\000S\000\000\000\021is_superuser\000off\000S\000\000\000\025server_encoding\000UTF8\000S\000\000\000\025server_version\0008.4.7\000S\000\000\000\"session_authorization\000yziquel\000S\000\000\000$standard_conforming_strings\000off\000S\000\000\000\023TimeZone\000localtime\000K\000\000\000\012\000\000|\197{\177\235?Z\000\000\000\005I"

Needed to prepend the length of the packet.

Didn't appear very clearly in the docs. But this link got me more info:

http://blog.endpoint.com/2010/05/finding-postgresql-version-without.html

Thanks for your time.

-- 
     Guillaume Yziquel

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux