| From: | Douglas McNaught <doug(at)mcnaught(dot)org> | 
|---|---|
| To: | Randall Smith <randall(at)tnr(dot)cc> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: connecting to server process via sockets | 
| Date: | 2005-05-16 15:35:46 | 
| Message-ID: | m2wtpz420d.fsf@Douglas-McNaughts-Powerbook.local | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Randall Smith <randall(at)tnr(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lada 'Ray' Lostak | 2005-05-16 16:06:46 | Re: Sequences question & problem | 
| Previous Message | John DeSoi | 2005-05-16 15:32:19 | Re: connecting to server process via sockets |