Re: connecting to server process via sockets

Поиск
Список
Период
Сортировка
От Yanni Chiu
Тема Re: connecting to server process via sockets
Дата
Msg-id 4288C532.9E8E5BCF@rogers.com
обсуждение исходный текст
Ответ на connecting to server process via sockets  (Randall Smith <randall@tnr.cc>)
Список pgsql-general
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@rogers.com/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

В списке pgsql-general по дате отправления:

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: connecting to server process via sockets
Следующее
От: "Lada 'Ray' Lostak"
Дата:
Сообщение: Re: Sequences question & problem