Re: Implementation of the frontend protocol - Mailing list pgsql-general

From Tom Lane
Subject Re: Implementation of the frontend protocol
Date
Msg-id 27841.974735904@sss.pgh.pa.us
Whole thread Raw
In response to Re: Implementation of the frontend protocol  (Peter Korsgaard <jacmet@control.auc.dk>)
Responses Re: Implementation of the frontend protocol  (Peter Korsgaard <jacmet@control.auc.dk>)
Re: Implementation of the frontend protocol  (Peter Korsgaard <jacmet@control.auc.dk>)
List pgsql-general
Peter Korsgaard <jacmet@control.auc.dk> writes:
> After I send the ReadyForQuery packet I recieve a Query packet containing
> "select getdatabaseencoding()", which I cannot find information about
> anywhere.

It's just an SQL function in the backend.

> What am I supposed to return in response to this select?

You're supposed to send it to the backend for execution and pass back
the resulting output.

You'll find that libpq (and psql even more so) issue a number of queries
all by themselves after connection startup; just because you don't think
you've done anything doesn't mean that the backend hasn't cycled through
several queries ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql on FreeBSD
Next
From: Peter Korsgaard
Date:
Subject: Re: Implementation of the frontend protocol