Re: connecting to server process via sockets - Mailing list pgsql-general

From Douglas McNaught
Subject Re: connecting to server process via sockets
Date
Msg-id m2wtpz420d.fsf@Douglas-McNaughts-Powerbook.local
Whole thread Raw
In response to connecting to server process via sockets  (Randall Smith <randall@tnr.cc>)
List pgsql-general
Randall Smith <randall@tnr.cc> writes:

> 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.  I've been using the JDBC driver and the online
> documentation as a guide, but I'm afraid my ignorance has led me to
> failure thus far.

[...]

No direct help, but a couple of suggestions:

1) Take a look at pg-dot-lisp, which does the same thing you are
   trying to do, but in Lisp.  You might find it more readable than
   the JDBC driver.  I am not sure which protocol versions it
   supports, though.  It's at:

      http://www.chez.com/emarsden/downloads/

2) Write a simple libpq app (or use one of the existing Python
   interfaces linked against libpq) and watch the session with
   Etherial or tcpdump.  That'll show you the differences between your
   failing app and a working connection...

-Doug

pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: connecting to server process via sockets
Next
From: Yanni Chiu
Date:
Subject: Re: connecting to server process via sockets