[GENERAL] Startup messages for socket protocol

2011-03-17 Thread Guillaume Yziquel
Hi. I've been trying to get a connection working to a PostgreSQL server through the socket-level protocol. I've therefore been looking at fe-connect.c and fe-protocol3.c in the src/interfaces/libpq folder. Reading those sources, I understood, that the startup message should begin with a request

Re: [GENERAL] Startup messages for socket protocol

2011-03-17 Thread Tom Lane
Guillaume Yziquel guillaume.yziq...@citycable.ch writes: However, when I try to send this as the first thing, I get disconnected by the server. Reading what the psql program does, I first get an 8 byte message containing this: \000\000\000\008\004\210\022/ This seems

Re: [GENERAL] Startup messages for socket protocol

2011-03-17 Thread Guillaume Yziquel
Le Thursday 17 Mar 2011 à 10:48:50 (-0400), Tom Lane a écrit : Guillaume Yziquel guillaume.yziq...@citycable.ch writes: However, when I try to send this as the first thing, I get disconnected by the server. Reading what the psql program does, I first get an 8 byte message containing this:

Re: [GENERAL] Startup messages for socket protocol

2011-03-17 Thread Guillaume Yziquel
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.yziq...@citycable.ch writes: For now, when sending \000\003\000\000 and only this, the server seems to disconnect. The recv()