mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Add PQresStatus() function to avoid direct access to pgresStatus[] array,
making life easier for Windoids...
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.72 1999/02/03 20:19:10 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.73 1999/02/07 22:08:52 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1518,6 +1518,15 @@ PQresultStatus(PGresult *res)
|
||||
return res->resultStatus;
|
||||
}
|
||||
|
||||
const char *
|
||||
PQresStatus(ExecStatusType status)
|
||||
{
|
||||
if (((int) status) < 0 ||
|
||||
((int) status) >= (sizeof(pgresStatus) / sizeof(pgresStatus[0])))
|
||||
return "Invalid ExecStatusType code";
|
||||
return pgresStatus[status];
|
||||
}
|
||||
|
||||
const char *
|
||||
PQresultErrorMessage(PGresult *res)
|
||||
{
|
||||
|
Reference in New Issue
Block a user