Re: Lack of docs for libpq C Library
От
Bruce Momjian
Тема
Re: Lack of docs for libpq C Library
Дата
Msg-id
200803061539.m26Fd5B20620@momjian.us
Ответ на
Re: Lack of docs for libpq C Library (Tom Lane)
Список
Дерево обсуждения
Lack of docs for libpq C Library Pavel Golub <pavel@microolap.com>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Alvaro Herrera <alvherre@commandprompt.com>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Pavel Golub <pavel@microolap.com>
Re: Lack of docs for libpq C Library Tom Lane <tgl@sss.pgh.pa.us>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Tom Lane <tgl@sss.pgh.pa.us>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Alvaro Herrera <alvherre@commandprompt.com>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Alvaro Herrera <alvherre@commandprompt.com>
Re: Lack of docs for libpq C Library "Joshua D. Drake" <jd@commandprompt.com>
Re: Lack of docs for libpq C Library Tom Lane <tgl@sss.pgh.pa.us>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Tom Lane <tgl@sss.pgh.pa.us>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library "Joshua D. Drake" <jd@commandprompt.com>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Peter Eisentraut <peter_e@gmx.net>
Re: Lack of docs for libpq C Library Tom Lane <tgl@sss.pgh.pa.us>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Peter Eisentraut <peter_e@gmx.net>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Re: Lack of docs for libpq C Library Bruce Momjian <bruce@momjian.us>
Tom Lane wrote:
> Alvaro Herrera writes:
> > I disagree. I think PQinitSSL is meant to be called from the
> > application, for example. Same with PQsetClientEncoding. And the
> > PQExpBuffer stuff is all very useful, and years ago when I wrote an app
> > to use it it annoyed me that there were no docs on it. (Back then, I
> > didn't realize I could have complained about it or written the docs
> > myself).
>
> PQsetClientEncoding seems to be documented in the wrong place.
I have moved the libpq client encoding documentation into the libpq doc
section, and just referenced it from the localization docs. Backpatched
to 8.3.X.
--
Bruce Momjian http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/charset.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v
retrieving revision 2.84
diff -c -c -r2.84 charset.sgml
*** doc/src/sgml/charset.sgml 28 Sep 2007 22:25:49 -0000 2.84
--- doc/src/sgml/charset.sgml 6 Mar 2008 15:32:28 -0000
***************
*** 1110,1140 ****
! Using libpq</> functions.
! \encoding actually calls
! PQsetClientEncoding() for its purpose.
!
!
! int PQsetClientEncoding(PGconn *conn, const char *encoding);
!
!
! where conn is a connection to the server,
! and encoding is the encoding you
! want to use. If the function successfully sets the encoding, it returns 0,
! otherwise -1. The current encoding for this connection can be determined by
! using:
!
!
! int PQclientEncoding(const PGconn *conn);
!
!
! Note that it returns the encoding ID, not a symbolic string
! such as EUC_JP. To convert an encoding ID to an encoding name, you
! can use:
!
!
! char *pg_encoding_to_char(int encoding_id);
!
--- 1110,1116 ----
! libpq</> () has functions to control the client encoding.
Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v
retrieving revision 1.255
diff -c -c -r1.255 libpq.sgml
*** doc/src/sgml/libpq.sgml 31 Jan 2008 23:31:33 -0000 1.255
--- doc/src/sgml/libpq.sgml 6 Mar 2008 15:32:32 -0000
***************
*** 4417,4422 ****
--- 4417,4472 ----
+ PQclientEncoding
+
+ PQclientEncoding
+
+
+
+
+
+ Returns the client encoding.
+
+ int PQclientEncoding(const PGconn *conn);
+
+
+ Note that it returns the encoding ID, not a symbolic string
+ such as EUC_JP. To convert an encoding ID to an encoding name, you
+ can use:
+
+
+ char *pg_encoding_to_char(int encoding_id);
+
+
+
+
+
+
+
+ PQsetClientEncoding
+
+ PQsetClientEncoding
+
+
+
+
+
+ Sets the client encoding.
+
+ int PQsetClientEncoding(PGconn *conn, const char *encoding);
+
+
+ conn is a connection to the server,
+ and encoding is the encoding you want to
+ use. If the function successfully sets the encoding, it returns 0,
+ otherwise -1. The current encoding for this connection can be
+ determined by using PQclientEncoding</>.
+
+
+
+
+
+
PQsetErrorVerbosity
PQsetErrorVerbosity
В списке pgsql-docs по дате отправления
От: Bruce Momjian
Дата: