I have this code in Oracle:
SELECT *
FROM USER_OBJECTS
WHERE TEMPORARY = 'N'
I know that the USER_OBJECT table in Postgres is pg_catalog.pg_class, but what’s the equivalent of the TEMPORARY column?
Thanks
>Solution :
SELECT *
FROM pg_class
WHERE relpersistence = 't';
REF: https://www.postgresql.org/docs/current/catalog-pg-class.html
relpersistence char
p = permanent table/sequence, u = unlogged table/sequence, t = temporary table/sequence