Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/libpq.sgml,v
retrieving revision 1.98
diff -c -c -r1.98 libpq.sgml
*** doc/src/sgml/libpq.sgml 3 Nov 2002 01:30:46 -0000 1.98
--- doc/src/sgml/libpq.sgml 7 Nov 2002 23:14:22 -0000
***************
*** 1210,1216 ****
Returns the command status string from the SQL command that
generated the PGresult.
! char * PQcmdStatus(PGresult *res);
--- 1210,1216 ----
Returns the command status string from the SQL command that
generated the PGresult.
! const char * PQcmdStatus(const PGresult *res);
***************
*** 1220,1226 ****
PQcmdTuples
Returns the number of rows affected by the SQL command.
! char * PQcmdTuples(PGresult *res);
If the SQL command that generated the
PGresult was INSERT, UPDATE or DELETE, this returns a
--- 1220,1226 ----
PQcmdTuples
Returns the number of rows affected by the SQL command.
! const char * PQcmdTuples(const PGresult *res);
If the SQL command that generated the
PGresult was INSERT, UPDATE or DELETE, this returns a
Index: src/interfaces/libpq/fe-exec.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/libpq/fe-exec.c,v
retrieving revision 1.122
diff -c -c -r1.122 fe-exec.c
*** src/interfaces/libpq/fe-exec.c 4 Sep 2002 20:31:47 -0000 1.122
--- src/interfaces/libpq/fe-exec.c 7 Nov 2002 23:14:43 -0000
***************
*** 2234,2241 ****
return 0;
}
! char *
! PQcmdStatus(PGresult *res)
{
if (!res)
return NULL;
--- 2234,2241 ----
return 0;
}
! const char *
! PQcmdStatus(const PGresult *res)
{
if (!res)
return NULL;
***************
*** 2303,2310 ****
if the last command was an INSERT/UPDATE/DELETE, return number
of inserted/affected tuples, if not, return ""
*/
! char *
! PQcmdTuples(PGresult *res)
{
char noticeBuf[128];
--- 2303,2310 ----
if the last command was an INSERT/UPDATE/DELETE, return number
of inserted/affected tuples, if not, return ""
*/
! const char *
! PQcmdTuples(const PGresult *res)
{
char noticeBuf[128];
***************
*** 2315,2321 ****
strncmp(res->cmdStatus, "DELETE", 6) == 0 ||
strncmp(res->cmdStatus, "UPDATE", 6) == 0)
{
! char *p = res->cmdStatus + 6;
if (*p == 0)
{
--- 2315,2321 ----
strncmp(res->cmdStatus, "DELETE", 6) == 0 ||
strncmp(res->cmdStatus, "UPDATE", 6) == 0)
{
! const char *p = res->cmdStatus + 6;
if (*p == 0)
{
Index: src/interfaces/libpq/libpq-fe.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/libpq/libpq-fe.h,v
retrieving revision 1.86
diff -c -c -r1.86 libpq-fe.h
*** src/interfaces/libpq/libpq-fe.h 4 Sep 2002 20:31:47 -0000 1.86
--- src/interfaces/libpq/libpq-fe.h 7 Nov 2002 23:14:45 -0000
***************
*** 307,316 ****
extern Oid PQftype(const PGresult *res, int field_num);
extern int PQfsize(const PGresult *res, int field_num);
extern int PQfmod(const PGresult *res, int field_num);
! extern char *PQcmdStatus(PGresult *res);
extern char *PQoidStatus(const PGresult *res); /* old and ugly */
extern Oid PQoidValue(const PGresult *res); /* new and improved */
! extern char *PQcmdTuples(PGresult *res);
extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
extern int PQgetlength(const PGresult *res, int tup_num, int field_num);
extern int PQgetisnull(const PGresult *res, int tup_num, int field_num);
--- 307,316 ----
extern Oid PQftype(const PGresult *res, int field_num);
extern int PQfsize(const PGresult *res, int field_num);
extern int PQfmod(const PGresult *res, int field_num);
! extern const char *PQcmdStatus(const PGresult *res);
extern char *PQoidStatus(const PGresult *res); /* old and ugly */
extern Oid PQoidValue(const PGresult *res); /* new and improved */
! extern const char *PQcmdTuples(const PGresult *res);
extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
extern int PQgetlength(const PGresult *res, int tup_num, int field_num);
extern int PQgetisnull(const PGresult *res, int tup_num, int field_num);