X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 791985285C for ; Wed, 22 Jun 2005 12:38:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48438-03 for ; Wed, 22 Jun 2005 15:38:03 +0000 (GMT) Received: from susi23.aerodynamics.ch (mail02.aerodynamics.ch [192.54.122.8]) by svr1.postgresql.org (Postfix) with ESMTP id D13E25287D for ; Wed, 22 Jun 2005 12:38:00 -0300 (ADT) Received: from [192.168.0.95] (susi95.aerodynamics.ch [192.168.0.95]) by susi23.aerodynamics.ch (Postfix) with ESMTP id 4EA9F33432 for ; Wed, 22 Jun 2005 17:37:59 +0200 (CEST) Message-ID: <42B985D6.8050603@aerodynamics.ch> Date: Wed, 22 Jun 2005 17:37:58 +0200 From: Fischer Ulrich Organization: Ruag Aerospace User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Connect to a PostgreSQL-Server by TCP/IP Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/58 X-Sequence-Number: 5626 Hello I'm new in this List. I would like to connect to a Postgres-Server by a LabView-Client. The problem is, there is NO odbc-driver for LV on Linux and no LV-interface to postgreSQL. So I decided to make my own simple LabView driver. Are there some docs, which describes the basic communication over a tcp connection between the postgres server and a client? I'm interested in 'message architecture' (header, data for login, sql-querys and so on...) and all this stuff. I tried some backward engineering by sniffing the tcp connection, but it is rather anoying. It looks like the messages have some binary headers and they are a problem.... Has anybody an idea? Thanks for your help!!! Regards Ulrich Sniffing the communication between a running perl-script (DBI) and postgres: open tcp connection ..ok client request .......296 bytes (???) Postgres response ....1 byte (4e) client request .......296 bytes (including dbname username in ascii) Postgres response ....5 bytes (52 00 00 00 03) client request .......14 bytes (including password in ascii) Postgres response ....15 bytes (52 00 00 00 00 4b 00 00 78 6f 0c 43 eb 70 5a) client request .......44 bytes (Qbegin ; select getdatabaseencoding(); commit) Postgres response ....79 bytes (CBEGIN Pblank getdatabaseencoding SQL_ASCIICSELECT CCOMMIT) client request .......60 bytes (Qselect pid, name, vorname from mitarbeiter where pid= 'fiu') Postgres response ....96 bytes (Pblank pid name Dvorname fiu Fischer UlrichCSELECT) client request .......1 byte (58) -- Ulrich G. Fischer Dipl. Natw. ETH Center Aerodynamics Ruag Aerospace P.O. Box 301 CH-6032 Emmen Tel. +41 41 268 23 53 Fax. +41 41 268 38 97 ulrich.fischer@aerodynamics.ch www.ruag.com