Re: Implementing RESET CONNECTION ...
Karel Zak <zakkr@zf.jcu.cz>
From: Karel Zak <zakkr@zf.jcu.cz>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Kris Jurka <books@ejurka.com>, Hans-Jürgen Schönig <postgres@cybertec.at>, eg@cybertec.at, List pgsql-patches <pgsql-patches@postgreSQL.org>
Date: 2005-01-04T21:00:45Z
Lists: pgsql-hackers
On Wed, 2005-01-05 at 01:33 +1300, Oliver Jowett wrote: > Karel Zak wrote: > > I think each PG command returns some status. For example in libpq it's > > possible check by PQcmdStatus(). I think JDBC can checks this status (by > > own PQcmdStatus() implementation) and if PG returns string "CONNECTION- > > RESETED" it can deallocate internal stuff. This solution doesn't require > > touch the protocol. > > That could work. It's a bit ugly, though, as currently drivers don't > need to parse command status strings (unless they want an insert OID) I think command status is common and nice feedback for client. I think it's more simple change something in JDBC than change protocol that is shared between more tools. We need some common way how detect on client what's happen on server -- a way that doesn't mean change protocol always when we add some feature/command to backend. The command status is possible use for this. Karel -- Karel Zak <zakkr@zf.jcu.cz>