BUG #5180: How to get only User created tables by using SQLTables() in ODBC

Поиск
Список
Период
Сортировка
От Jitendra Lenka
Тема BUG #5180: How to get only User created tables by using SQLTables() in ODBC
Дата
Msg-id 200911121224.nACCOgU2030059@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5180: How to get only User created tables by using SQLTables() in ODBC  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: BUG #5180: How to get only User created tables by using SQLTables() in ODBC  (Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5180
Logged by:          Jitendra Lenka
Email address:      jitendra.lenka@csqldb.com
PostgreSQL version: 8.3.3
Operating system:   Fedora10
Description:        How to get only User created tables by using SQLTables()
in ODBC
Details:

Hi,

I created a table named "t1" in postgres. Used SQLTables() function in ODBC
to retrieve the table "t1" only. But it retrieves many System and Metadata
tables which bothers me.

Follow below to get all system tables along with user created table "t1".

sql_features
sql_implementation_info
sql_languages
sql_packages
sql_parts
sql_sizing
sql_sizing_profiles
t1

Can I get only user created table ?

If anybody find it good please report it in my mail ID.

Your reply is highly solicited.

Please find the code:
--------------------
retValue=SQLTables(hstmt, NULL, 0, NULL, 0, NULL, 0, (SQLCHAR*) "TABLE",
SQL_NTS);

while (SQL_SUCCEEDED(retValue = SQLFetch(hstmt))) {
        SQLUSMALLINT i;
        i=3;
        if(i<=columns){
            SQLINTEGER indicator;
            char buf[512];
            retValue=SQLGetData(hstmt, i, SQL_C_CHAR,
                         buf, sizeof(buf), &indicator);
            if (SQL_SUCCEEDED(retValue)) {
                 if (indicator == SQL_NULL_DATA) strcpy(buf, "NULL");
                 else{
                         printf("table:%s\n",buf);

                  }
             }
          }
      }

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5178: make check fails because of locale en_AU.US-ASCII
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #5171: Composite type with array does not translate in plpythonu