[SOLVED] Socket command type E unknown

From: Stefanos Harhalakis <v13(at)it(dot)teithe(dot)gr>
To: pgsql-general(at)postgresql(dot)org
Subject: [SOLVED] Socket command type E unknown
Date: 2003-09-01 13:45:50
Message-ID: 200309011645.58910.v13@it.teithe.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there...

I've seen in the mailing list archives that some people get this error
message:

FATAL: Socket command type E unknown

I didn't find any solution so I'm sending this message...

I had the same problem and after some debuging I've found that:

If you have a program that closes all fds (including stdin, stdout, stderr)
and after that you make a connectioon to the database that gets fd #1 (simply
open a file first and the connect to the database) and you have something
like:

printf("Exec: test");
<<send an sql command>>
fflush(stdout);

you'll get this error message... It seems that printf writes to stdout which
is fd #1 which is the socket that connects the program to the database.

I believe that you don't need any more details...

<<V13>>

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-09-01 15:13:21 Re: Prevent from Deletion
Previous Message Shridhar Daithankar 2003-09-01 13:25:39 Re: Where is the tool to migrate a mysql db to a PostgreSQL db ?