ODBC SQLSpecialColumns bugfix

Quan Zongliang <[email protected]> Tue, 13 Nov 2018 08:22:04 +0800
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
hi, all

odbc patch attached.

if a table does not exist,
SQLSpecialColumns returns oid/xmin incorrectly.

--
Quan Zongliang
info.c.patch (text/plain, 374 B)
diff --git a/info.c b/info.c
index 84b0f2a..052f0ae 100644
--- a/info.c
+++ b/info.c
@@ -2902,6 +2902,9 @@ retry_public_schema:
 			cbSchemaName = SQL_NTS;
 			goto retry_public_schema;
 		}
+
+		SC_set_error(stmt, DESC_BAD_PARAMETER_NUMBER_ERROR, "The specified table does not exist", func);
+		goto cleanup;
 	}
 
 	result = PGAPI_BindCol(col_stmt, 1, internal_asis_type,