PostgreSQL 10 Partition Tables: Support through PG Driver

From: Mahesh Kansara <mahesh_kansara(at)yahoo(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: PostgreSQL 10 Partition Tables: Support through PG Driver
Date: 2018-04-26 03:16:17
Message-ID: 1441476371.947853.1524712577982@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello Team,
My name is Mahesh and I am working with one application where we are connecting with PostgreSQL 10 database using PostgreSQL driver. 
Application is basically trying to get list of tables from target but not returning Partition tables information.  The query which PostgreSQL driver is generating is below.
select relname, nspname, relkind from pg_catalog.pg_class c, pg_catalog.pg_namespace n where relkind in ('r', 'v') and nspname like 'myschema' and relname like 'mytable' and nspname not in ('pg_catalog', 'information_schema', 'pg_toast', 'pg_temp_1') and n.oid = relnamespace order by nspname, relname
If I run this query directly on target it doesn't list partition table. If i change this query to something like below it works.
select relname, nspname, relkind from pg_catalog.pg_class c, pg_catalog.pg_namespace n where relkind in ('r', 'v', 'p') and nspname like 'myschema' and relname like 'mytable' and nspname not in ('pg_catalog', 'information_schema', 'pg_toast', 'pg_temp_1') and n.oid = relnamespace order by nspname, relname

I was looking at latest PostgreSQL driver  psqlodbc-10.02.0000 I am not seeing any code file which returns partition table.
Can you please share some more information on how to get partition tables using PostgreSQL driver.
Please let me know if you need more information. 
Thanks,Mahesh K

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2018-04-26 21:47:36 Re: PostgreSQL 10 Partition Tables: Support through PG Driver
Previous Message Oleg 2018-04-25 16:39:13 ODBC 2.0 Bug: wrong timestamp data type