patch for PGAPI_Columns with Show system tables turned on
am 18.12.2005 00:42:00 von Ludek Finstrle--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello,
when I take a look at VB6 and RowCount (again) and I turn Parse
Statement option on there is problem with SQLColAttribute for
select * from pg_class. I found that pg_* is forbidden in PGAPI_Columns
when Show system tables is turned off. I think it's not right behaviour.
I write small patch which changes this behaviour. When is pg_* asked
in PGAPI_Columns directly it doesn't matter if Show system tables is
turned on or off.
Please review and comment
Luf
--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psqlodbc-columns_pg.diff"
diff -c psqlodbc.orig\info.c psqlodbc\info.c
*** psqlodbc.orig\info.c Wed Nov 30 13:44:22 2005
--- psqlodbc\info.c Sun Dec 18 01:37:01 2005
***************
*** 1763,1769 ****
my_strcat1(columns_query, " and a.attname %s '%.*s'", likeeq, szColumnName, cbColumnName);
}
! if (!atoi(ci->show_system_tables))
{
if (conn->schema_support)
strcat(columns_query, " and nspname !~ '^" POSTGRES_SYS_PREFIX "'");
--- 1763,1770 ----
my_strcat1(columns_query, " and a.attname %s '%.*s'", likeeq, szColumnName, cbColumnName);
}
! if ((!atoi(ci->show_system_tables)) &&
! (((cbTableName != SQL_NTS) && (cbTableName < 4)) || (strncmp(szTableName,"pg_",3))))
{
if (conn->schema_support)
strcat(columns_query, " and nspname !~ '^" POSTGRES_SYS_PREFIX "'");
--LZvS9be/3tNcYl/X
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
--LZvS9be/3tNcYl/X--