1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Rename readonly to onlyread in odbc. Use varargs properly.

This commit is contained in:
Bruce Momjian
1999-11-30 02:44:09 +00:00
parent daf6ffb6f0
commit d264b53d2f
6 changed files with 27 additions and 29 deletions

View File

@ -108,8 +108,8 @@ StatementClass *self = (StatementClass *) hstmt;
self->prepare = TRUE;
self->statement_type = statement_type(self->statement);
// Check if connection is readonly (only selects are allowed)
if ( CC_is_readonly(self->hdbc) && STMT_UPDATE(self)) {
// Check if connection is onlyread (only selects are allowed)
if ( CC_is_onlyread(self->hdbc) && STMT_UPDATE(self)) {
self->errornumber = STMT_EXEC_ERROR;
self->errormsg = "Connection is readonly, only select statements are allowed.";
SC_log_error(func, "", self);
@ -159,8 +159,8 @@ static char *func = "SQLExecDirect";
stmt->prepare = FALSE;
stmt->statement_type = statement_type(stmt->statement);
// Check if connection is readonly (only selects are allowed)
if ( CC_is_readonly(stmt->hdbc) && STMT_UPDATE(stmt)) {
// Check if connection is onlyread (only selects are allowed)
if ( CC_is_onlyread(stmt->hdbc) && STMT_UPDATE(stmt)) {
stmt->errornumber = STMT_EXEC_ERROR;
stmt->errormsg = "Connection is readonly, only select statements are allowed.";
SC_log_error(func, "", stmt);
@ -727,5 +727,3 @@ char *buffer;
return SQL_SUCCESS;
}