Search Postgresql Archives

Re: connecting to server process via sockets

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

 



Randall Smith wrote:
> 
> For fun and learning, I would like to connect to the Postgresql backend
> and issue queries using sockets.  I'm using Python's socket module.  I'm
> new to socket programming, but I'm experienced with Python and
> Postgresql.

Look in the postgres docs for the section on frontend/backend protocol.
The handshaking and format of the bytes that go across the socket 
are explained in that doc. section.

You also might want to look at:

    http://ca.geocities.com/zazu@xxxxxxxxxx/pgsqueak/

where there are links to a class diagram and state diagram
of an implementation done in Squeak Smalltalk. I don't know
Python, but IMHO the basic design should be transferable.

Note that frontend/backend protocol version 2 is implemented
in that code, and the current docs will reflect version 3
(so you'd have to look at the older docs to match up the code).

Hope that helps.
--yanni


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[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