@@ -1104,7 +1104,7 @@ SQLTables(
1104
1104
HSTMT htbl_stmt ;
1105
1105
RETCODE result ;
1106
1106
char * tableType ;
1107
- char tables_query [STD_STATEMENT_LEN ];
1107
+ char tables_query [INFO_INQUIRY_LEN ];
1108
1108
char table_name [MAX_INFO_STRING ],
1109
1109
table_owner [MAX_INFO_STRING ],
1110
1110
relkind_or_hasrules [MAX_INFO_STRING ];
@@ -1422,7 +1422,7 @@ SQLColumns(
1422
1422
TupleNode * row ;
1423
1423
HSTMT hcol_stmt ;
1424
1424
StatementClass * col_stmt ;
1425
- char columns_query [STD_STATEMENT_LEN ];
1425
+ char columns_query [INFO_INQUIRY_LEN ];
1426
1426
RETCODE result ;
1427
1427
char table_owner [MAX_INFO_STRING ],
1428
1428
table_name [MAX_INFO_STRING ],
@@ -1862,7 +1862,7 @@ SQLSpecialColumns(
1862
1862
ConnInfo * ci ;
1863
1863
HSTMT hcol_stmt ;
1864
1864
StatementClass * col_stmt ;
1865
- char columns_query [STD_STATEMENT_LEN ];
1865
+ char columns_query [INFO_INQUIRY_LEN ];
1866
1866
RETCODE result ;
1867
1867
char relhasrules [MAX_INFO_STRING ];
1868
1868
@@ -2003,7 +2003,7 @@ SQLStatistics(
2003
2003
{
2004
2004
static char * func = "SQLStatistics" ;
2005
2005
StatementClass * stmt = (StatementClass * ) hstmt ;
2006
- char index_query [STD_STATEMENT_LEN ];
2006
+ char index_query [INFO_INQUIRY_LEN ];
2007
2007
HSTMT hindx_stmt ;
2008
2008
RETCODE result ;
2009
2009
char * table_name ;
@@ -2171,12 +2171,12 @@ SQLStatistics(
2171
2171
indx_stmt = (StatementClass * ) hindx_stmt ;
2172
2172
2173
2173
sprintf (index_query , "select c.relname, i.indkey, i.indisunique"
2174
- ", x .indisclustered, a.amname, i .relhasrules"
2175
- " from pg_index x , pg_class i , pg_class c , pg_am a"
2176
- " where c .relname = '%s'"
2177
- " and c .oid = x .indrelid"
2178
- " and x .indexrelid = i .oid"
2179
- " and i .relam = a.oid"
2174
+ ", i .indisclustered, a.amname, c .relhasrules"
2175
+ " from pg_index i , pg_class c , pg_class d , pg_am a"
2176
+ " where d .relname = '%s'"
2177
+ " and d .oid = i .indrelid"
2178
+ " and i .indexrelid = c .oid"
2179
+ " and c .relam = a.oid"
2180
2180
, table_name );
2181
2181
2182
2182
result = SQLExecDirect (hindx_stmt , index_query , strlen (index_query ));
@@ -2455,7 +2455,7 @@ SQLPrimaryKeys(
2455
2455
int seq = 0 ;
2456
2456
HSTMT htbl_stmt ;
2457
2457
StatementClass * tbl_stmt ;
2458
- char tables_query [STD_STATEMENT_LEN ];
2458
+ char tables_query [INFO_INQUIRY_LEN ];
2459
2459
char attname [MAX_INFO_STRING ];
2460
2460
SDWORD attname_len ;
2461
2461
char pktab [MAX_TABLE_LEN + 1 ];
@@ -2641,7 +2641,7 @@ SQLForeignKeys(
2641
2641
StatementClass * tbl_stmt ;
2642
2642
RETCODE result ,
2643
2643
keyresult ;
2644
- char tables_query [STD_STATEMENT_LEN ];
2644
+ char tables_query [INFO_INQUIRY_LEN ];
2645
2645
char trig_deferrable [2 ];
2646
2646
char trig_initdeferred [2 ];
2647
2647
char trig_args [1024 ];
0 commit comments