aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/pgtypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc/pgtypes.c')
-rw-r--r--src/interfaces/odbc/pgtypes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/odbc/pgtypes.c b/src/interfaces/odbc/pgtypes.c
index 5b6f85fbc39..b40985866e6 100644
--- a/src/interfaces/odbc/pgtypes.c
+++ b/src/interfaces/odbc/pgtypes.c
@@ -234,7 +234,9 @@ pgtype_to_sqltype(StatementClass *stmt, Int4 type)
{
ConnectionClass *conn = SC_get_conn(stmt);
ConnInfo *ci = &(conn->connInfo);
+#if (ODBCVER >= 0x0300)
EnvironmentClass *env = (EnvironmentClass *) (conn->henv);
+#endif
switch (type)
{
@@ -342,7 +344,9 @@ pgtype_to_ctype(StatementClass *stmt, Int4 type)
{
ConnectionClass *conn = SC_get_conn(stmt);
ConnInfo *ci = &(conn->connInfo);
+#if (ODBCVER >= 0x0300)
EnvironmentClass *env = (EnvironmentClass *) (conn->henv);
+#endif
switch (type)
{