Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0edcee3

Browse files
committed
Fold PQsetenv working state into PGconn, rather than trying to maintain
it in a separate object. There's no value in keeping the state separate,and it creates dangling-pointer problems. Also, remove PQsetenv routinesfrom public API, until and unless they are redesigned to have a saferinterface. Since they were never part of the documented API before 7.0,it's unlikely that anyone is calling them.
1 parent5b1f92e commit0edcee3

File tree

4 files changed

+90
-207
lines changed

4 files changed

+90
-207
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -629,63 +629,6 @@ int PQbackendPID(const PGconn *conn);
629629
server host, not the local host!
630630
</para>
631631
</listitem>
632-
633-
<listitem>
634-
<para>
635-
<function>PQsetenvStart</function>
636-
<function>PQsetenvPoll</function>
637-
<function>PQsetenvAbort</function>
638-
Perform an environment negotiation.
639-
<synopsis>
640-
PGsetenvHandle *PQsetenvStart(PGconn *conn)
641-
</synopsis>
642-
643-
<synopsis>
644-
PostgresPollingStatusType *PQsetenvPoll(PGsetenvHandle handle)
645-
</synopsis>
646-
<synopsis>
647-
void PQsetenvAbort(PGsetenvHandle handle)
648-
</synopsis>
649-
These two routines can be used to re-perform the environment negotiation
650-
that occurs during the opening of a connection to a database
651-
server. I have
652-
no idea why this might be useful (XXX anyone?) but it might prove useful
653-
for users to be able to reconfigure their character encodings
654-
on-the-fly, for example.
655-
</para>
656-
<para>
657-
These functions will not block, subject to the restrictions applied to
658-
PQconnectStart and PQconnectPoll.
659-
</para>
660-
<para>
661-
To begin, call handle=PQsetenvStart(conn), where conn is an open connection
662-
to the database server. If handle is NULL, then libpq has been unable to
663-
allocate a new PGsetenvHandle structure. Otherwise, a valid handle is
664-
returned. This handle is intended to be opaque - you may only use it to
665-
call other functions in libpq (PQsetenvPoll, for example).
666-
</para>
667-
<para>
668-
Poll the procedure using PQsetenvPoll, in exactly the same way as you would
669-
create a connection using PQconnectPoll.
670-
</para>
671-
672-
<para>
673-
The procedure may be aborted at any time by calling PQsetenvAbort(handle).
674-
</para>
675-
</listitem>
676-
677-
<listitem>
678-
<para>
679-
<function>PQsetenv</function>
680-
Perform an environment negotiation.
681-
<synopsis>
682-
int PQsetenv(PGconn *conn)
683-
</synopsis>
684-
This function performs the same duties as PQsetenvStart and
685-
PQsetenvPoll, but
686-
blocks to do so. It returns 1 on success and 0 on failure.
687-
</para>
688-
</listitem>
689632
</itemizedlist>
690633
</para>
691634
</sect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp