From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Jelte Fennema <me(at)jeltef(dot)nl> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Dmitry Igrishin <dmitigr(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
Subject: | Re: Deleting prepared statements from libpq. |
Date: | 2023-06-18 23:57:17 |
Message-ID: | ZI+Z3SQrnHUqmRKO@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jun 18, 2023 at 01:03:57PM +0200, Jelte Fennema wrote:
> Sorry about that. I attached a new patch that allows linking to the
> new functions (I forgot to add the functions to exports.txt). This new
> patch also adds some basic tests for these new functions.
I am okay with the arguments about pgbouncer and psycopg2. The
symmetry with the portal description routines makes this proposal easy
to think about.
- PGQUERY_CLOSE
+ PGQUERY_CLOSE /* Close Statoment or Portal */
s/Statoment/Statement/.
+ * Available options for close_type are
+ * 'S' to close a prepared statement; or
+ * 'P' to close a portal.
+ * Returns 1 on success and 0 on failure.
+ */
+static int
+PQsendClose(PGconn *conn, char close_type, const char *close_target)
Could it be better for this code path to issue an error if using a
non-supported close_type rather than sending it? Okay, you are
consistent with desc_type and PQsendDescribe(), just asking if it is
worth doing something about.
+ <listitem>
+ <para>
+ Submits a request to obtain information about the specified
+ prepared statement, and waits for completion.
+<synopsis>
PQclosePrepared() does not request for a description.
+ Submits a request to close the the specified
+ portal, and waits for completion.
s/the the/the/.
+ <xref linkend="libpq-PQclosePortal"/> allows an application to release
+ resources related to a portal previously created portal. If it was a
The end of this sentence looks a bit weird.
Perhaps there should be some tests for the two async routines, as
well?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2023-06-19 00:00:00 | Re: Do we want a hashset type? |
Previous Message | Michael Paquier | 2023-06-18 23:31:02 | Re: Deleting prepared statements from libpq. |