Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9ceb5d8

Browse files
committed
Fixed psql double quoting of SQL ids
Fixed libpq printing functions
1 parent 4842ef8 commit 9ceb5d8

29 files changed

+1044
-767
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ soon.)
494494
<function>PQdb</function>
495495
Returns the database name of the connection.
496496
<synopsis>
497-
const char *PQdb(const PGconn *conn)
497+
char *PQdb(const PGconn *conn)
498498
</synopsis>
499499
PQdb and the next several functions return the values established
500500
at connection. These values are fixed for the life of the PGconn
@@ -507,7 +507,7 @@ object.
507507
<function>PQuser</function>
508508
Returns the user name of the connection.
509509
<synopsis>
510-
const char *PQuser(const PGconn *conn)
510+
char *PQuser(const PGconn *conn)
511511
</synopsis>
512512
</para>
513513
</listitem>
@@ -517,7 +517,7 @@ const char *PQuser(const PGconn *conn)
517517
<function>PQpass</function>
518518
Returns the password of the connection.
519519
<synopsis>
520-
const char *PQpass(const PGconn *conn)
520+
char *PQpass(const PGconn *conn)
521521
</synopsis>
522522
</para>
523523
</listitem>
@@ -527,7 +527,7 @@ const char *PQpass(const PGconn *conn)
527527
<function>PQhost</function>
528528
Returns the server host name of the connection.
529529
<synopsis>
530-
const char *PQhost(const PGconn *conn)
530+
char *PQhost(const PGconn *conn)
531531
</synopsis>
532532
</para>
533533
</listitem>
@@ -537,7 +537,7 @@ const char *PQhost(const PGconn *conn)
537537
<function>PQport</function>
538538
Returns the port of the connection.
539539
<synopsis>
540-
const char *PQport(const PGconn *conn)
540+
char *PQport(const PGconn *conn)
541541
</synopsis>
542542
</para>
543543
</listitem>
@@ -547,7 +547,7 @@ const char *PQport(const PGconn *conn)
547547
<function>PQtty</function>
548548
Returns the debug tty of the connection.
549549
<synopsis>
550-
const char *PQtty(const PGconn *conn)
550+
char *PQtty(const PGconn *conn)
551551
</synopsis>
552552
</para>
553553
</listitem>
@@ -557,7 +557,7 @@ const char *PQtty(const PGconn *conn)
557557
<function>PQoptions</function>
558558
Returns the backend options used in the connection.
559559
<synopsis>
560-
const char *PQoptions(const PGconn *conn)
560+
char *PQoptions(const PGconn *conn)
561561
</synopsis>
562562
</para>
563563
</listitem>
@@ -602,7 +602,7 @@ ConnStatusType PQstatus(const PGconn *conn)
602602
Returns the error message most recently generated by
603603
an operation on the connection.
604604
<synopsis>
605-
const char *PQerrorMessage(const PGconn* conn);
605+
char *PQerrorMessage(const PGconn* conn);
606606
</synopsis>
607607
</para>
608608

@@ -790,7 +790,7 @@ exposes a bug in the client software.
790790
Converts the enumerated type returned by PQresultStatus into
791791
a string constant describing the status code.
792792
<synopsis>
793-
const char *PQresStatus(ExecStatusType status);
793+
char *PQresStatus(ExecStatusType status);
794794
</synopsis>
795795
</para>
796796
</listitem>
@@ -801,7 +801,7 @@ const char *PQresStatus(ExecStatusType status);
801801
returns the error message associated with the query, or an empty string
802802
if there was no error.
803803
<synopsis>
804-
const char *PQresultErrorMessage(const PGresult *res);
804+
char *PQresultErrorMessage(const PGresult *res);
805805
</synopsis>
806806
Immediately following a <function>PQexec</function> or <function>PQgetResult</function>
807807
call, <function>PQerrorMessage</function> (on the connection) will return the same
@@ -855,7 +855,7 @@ extracts data from a <acronym>BINARY</acronym> cursor.
855855
Returns the field (attribute) name associated with the given field index.
856856
Field indices start at 0.
857857
<synopsis>
858-
const char *PQfname(const PGresult *res,
858+
char *PQfname(const PGresult *res,
859859
int field_index);
860860
</synopsis>
861861
</para>
@@ -931,9 +931,9 @@ int PQfmod(const PGresult *res,
931931
of a PGresult.
932932
Tuple and field indices start at 0.
933933
<synopsis>
934-
const char* PQgetvalue(const PGresult *res,
935-
int tup_num,
936-
int field_num);
934+
char* PQgetvalue(const PGresult *res,
935+
int tup_num,
936+
int field_num);
937937
</synopsis>
938938
For most queries, the value returned by <function>PQgetvalue</function>
939939
is a null-terminated <acronym>ASCII</acronym> string representation
@@ -991,7 +991,7 @@ int PQgetisnull(const PGresult *res,
991991
Returns the command status string from the SQL command that
992992
generated the PGresult.
993993
<synopsis>
994-
const char * PQcmdStatus(const PGresult *res);
994+
char * PQcmdStatus(const PGresult *res);
995995
</synopsis>
996996
</para>
997997
</listitem>
@@ -1001,7 +1001,7 @@ const char * PQcmdStatus(const PGresult *res);
10011001
<function>PQcmdTuples</function>
10021002
Returns the number of rows affected by the SQL command.
10031003
<synopsis>
1004-
const char * PQcmdTuples(const PGresult *res);
1004+
char * PQcmdTuples(const PGresult *res);
10051005
</synopsis>
10061006
If the <acronym>SQL</acronym> command that generated the
10071007
PGresult was INSERT, UPDATE or DELETE, this returns a
@@ -1032,7 +1032,7 @@ Oid PQoidValue(const PGresult *res);
10321032
inserted, if the <acronym>SQL</acronym> command was an INSERT.
10331033
Otherwise, returns an empty string.
10341034
<synopsis>
1035-
const char * PQoidStatus(const PGresult *res);
1035+
char * PQoidStatus(const PGresult *res);
10361036
</synopsis>
10371037
The function is deprecated in favor of <function>PQoidValue</function>
10381038
and is not thread-safe.
@@ -1050,25 +1050,25 @@ void PQprint(FILE* fout, /* output stream */
10501050
const PQprintOpt *po);
10511051

10521052
struct {
1053-
int header; /* print output field headings and row count */
1054-
int align; /* fill align the fields */
1055-
int standard; /* old brain dead format */
1056-
int html3; /* output html tables */
1057-
int expanded; /* expand tables */
1058-
int pager; /* use pager for output if needed */
1053+
pqbool header; /* print output field headings and row count */
1054+
pqbool align; /* fill align the fields */
1055+
pqbool standard; /* old brain dead format */
1056+
pqbool html3; /* output html tables */
1057+
pqbool expanded; /* expand tables */
1058+
pqbool pager; /* use pager for output if needed */
10591059
char *fieldSep; /* field separator */
10601060
char *tableOpt; /* insert to HTML &lt;table ...&gt; */
10611061
char *caption; /* HTML &lt;caption&gt; */
10621062
char **fieldName; /* null terminated array of replacement field names */
10631063
} PQprintOpt;
10641064
</synopsis>
1065-
10661065
This function was formerly used by <application>psql</application>
10671066
to print query results, but this is no longer the case and this
1068-
function is no longer supported.
1067+
function is no longer actively supported.
10691068
</para>
10701069
</listitem>
10711070

1071+
</listitem>
10721072
<listitem>
10731073
<para>
10741074
<function>PQclear</function>

0 commit comments

Comments
 (0)