You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to get Metadata with a schema on Postgresql foreign tables.
The problem is establishing the table list with MetaData() seems to generate a query to the database similar to the below, only including relkind r or p and therefore doesn’t return any usable table names.
is there a way to include tabes of type f ? Or how could it be achieved?
SELECT pg_catalog.pg_class.relname FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace
WHERE pg_catalog.pg_class.relkind = ANY (ARRAY['r', 'p']) AND pg_catalog.pg_class.relpersistence != 't' AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid)
AND pg_catalog.pg_namespace.nspname != 'pg_catalog'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to get Metadata with a schema on Postgresql foreign tables.
The problem is establishing the table list with MetaData() seems to generate a query to the database similar to the below, only including relkind r or p and therefore doesn’t return any usable table names.
is there a way to include tabes of type f ? Or how could it be achieved?
SELECT pg_catalog.pg_class.relname FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace
WHERE pg_catalog.pg_class.relkind = ANY (ARRAY['r', 'p']) AND pg_catalog.pg_class.relpersistence != 't' AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid)
AND pg_catalog.pg_namespace.nspname != 'pg_catalog'
Beta Was this translation helpful? Give feedback.
All reactions