public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Tatsuo Ishii <[email protected]>
Cc: [email protected]
Subject: Re: When extended query protocol ends?
Date: Mon, 29 Jan 2024 18:40:15 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Tatsuo Ishii <[email protected]> writes:
> Below is outputs from "pgproto" command coming with Pgpool-II.
> (Lines starting "FE" represents a message from frontend to backend.
> Lines starting "BE" represents a message from backend to frontend.)

> FE=> Parse(stmt="", query="SET extra_float_digits = 3")
> FE=> Bind(stmt="", portal="")
> FE=> Execute(portal="")
> FE=> Parse(stmt="", query="SET extra_float_digits = 3")
> FE=> Bind(stmt="", portal="")
> FE=> Execute(portal="")
> FE=> Query (query="SET extra_float_digits = 3")
> <= BE ParseComplete
> <= BE BindComplete
> <= BE CommandComplete(SET)
> <= BE ParseComplete
> <= BE BindComplete
> <= BE CommandComplete(SET)
> <= BE CommandComplete(SET)
> <= BE ReadyForQuery(I)
> FE=> Terminate

> As you can see, two "SET extra_float_digits = 3" is sent in the
> extended query protocol, then one "SET extra_float_digits = 3" follows
> in the simple query protocol. No sync message is sent. However, I get
> ReadyForQuery at the end. It seems the extended query protocol is
> ended by a simple query protocol message instead of a sync message.

> My question is, is this legal in terms of fronted/backend protocol?

I think it's poor practice, at best.  You should end the
extended-protocol query cycle before invoking simple query.

I'm disinclined to document, or make any promises about,
what happens if you mix the protocols.

			regards, tom lane





view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: When extended query protocol ends?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox