Re: Deleting prepared statements from libpq.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Deleting prepared statements from libpq.
Дата
Msg-id ZI+Z3SQrnHUqmRKO@paquier.xyz
обсуждение исходный текст
Ответ на Re: Deleting prepared statements from libpq.  (Jelte Fennema <me@jeltef.nl>)
Ответы Re: Deleting prepared statements from libpq.  (jian he <jian.universality@gmail.com>)
Re: Deleting prepared statements from libpq.  (Jelte Fennema <me@jeltef.nl>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Deleting prepared statements from libpq.
Следующее
От: jian he
Дата:
Сообщение: Re: Do we want a hashset type?