⬅︎ Back to pg_class to check if table exists
Thanks!
btw. there's a problem with temporary tables, cause they might not be visible (even though they exist). it's better to use: SELECT 1 FROM pg_catalog.pg_class WHERE relkind = 'r' AND relname = 'name' AND pg_catalog.pg_table_is_visible(oid) LIMIT 1
Comment
Thanks!
Parent comment
btw. there's a problem with temporary tables, cause they might not be visible (even though they exist). it's better to use: SELECT 1 FROM pg_catalog.pg_class WHERE relkind = 'r' AND relname = 'name' AND pg_catalog.pg_table_is_visible(oid) LIMIT 1