[SOLVED] Socket command type E unknown - Mailing list pgsql-general

From Stefanos Harhalakis
Subject [SOLVED] Socket command type E unknown
Date
Msg-id 200309011645.58910.v13@it.teithe.gr
Whole thread Raw
List 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>>

Attachment

pgsql-general by date:

Previous
From: Bo Lorentsen
Date:
Subject: Re: Using oids
Next
From: Christopher Browne
Date:
Subject: Re: Commercial postgresql