Received: from fujitsuII.fujitsu.com (fujitsuII.fujitsu.com [133.164.11.2]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA73177; Thu, 22 Jul 1999 17:11:06 -0400 (EDT) (envelope-from jdale@fla.fujitsu.com) Received: (from root@localhost) by fujitsuII.fujitsu.com (8.9.3/8.9.3) id OAA19691; Thu, 22 Jul 1999 14:10:35 -0700 (PDT) Received: from ns.net.fla.fujitsu.com (ns.NET.FLA.FUJITSU.COM [133.164.59.2]) by fujitsuII.fujitsu.com (8.9.3/8.9.3) with ESMTP id OAA19687; Thu, 22 Jul 1999 14:10:34 -0700 (PDT) Received: from fla.fujitsu.com (jdale@homer.net.fla.fujitsu.com [133.164.59.125]) by ns.net.fla.fujitsu.com (8.8.7/3.7W) with ESMTP id OAA01406; Thu, 22 Jul 1999 14:10:05 -0700 (PDT) Sender: jdale@ns.NET.FLA.FUJITSU.COM Message-ID: <3796C1D3.35DA43C8@fla.fujitsu.com> Date: Thu, 22 Jul 1999 00:01:39 -0700 From: Jonathan Dale Reply-To: jdale@fla.fujitsu.com Organization: Fujitsu Laboratories of America, Incorporated X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.10 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-hackers@postgresql.org, pgsql-ports@postgresql.org, pgsql-interfaces@postgresql.org Subject: Frontend/Backend Protocol Content-Type: multipart/mixed; boundary="------------4B25BBC853B6FE71CD5960DE" This is a multi-part message in MIME format. --------------4B25BBC853B6FE71CD5960DE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I am trying to write an interface for accessing the postmaster and subsequently a postgres database server in a language that our group has written, which is called APRIL. However, I am having a few problems making the connection. I appear to be able to make a successfuly connection to the postmaster by making a normal socket connection to port 5432 and sending a startup packet, which consists of: 00 00 01 20 as the length (296 bytes) 00 02 00 00 as the major and minor protocol numbers (2.0) "dbname\0" as a 64 byte string representing the database name "postgres\0" as a 32 byte string representing the user name "\0" as a 64 byte string representing the options "\0" as a 64 byte string representing unused bytes "\0" as a 64 byte string representing the tty And I get back: "R" 00 00 00 00 which indicates a successful connection However, when my process has read this, the postmaster displays the following error: FATAL 1: Socket command type unknown and the connection is closed. Does anyone have any idea of what I am doing wrong? I assumed that the postmaster would fork a new postgres process to handle my connection and I should be expecting some data on the socket to tell me that the postgres process is ready for an SQL query. The postmaster is being executed with the -i option. Thanks in advance, Jonathan +-------------------------------------------------------------------+ | "Never settle with words what you can accomplish with a | | flamethrower." -- Bruce Feirstein | +-------------------------------------------------------------------+ --------------4B25BBC853B6FE71CD5960DE Content-Type: text/x-vcard; charset=us-ascii; name="jdale.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jonathan Dale Content-Disposition: attachment; filename="jdale.vcf" begin:vcard n:Dale;Jonathan tel;fax:+1 408 530 4515 tel;work:+1 408 530 4543 x-mozilla-html:FALSE url:http://www.nar.fla.com/ org:Fujitsu Laboratories of America, Incorporated;Network Agent Research Group adr:;;595 Lawrence Expressway;Sunnyvale;California;94086;USA version:2.1 email;internet:jdale@fla.fujitsu.com title:Member of Research Staff x-mozilla-cpt:;-11968 fn:Jonathan Dale end:vcard --------------4B25BBC853B6FE71CD5960DE--