Thread: SELECT 'pg_catalog.pg_class'::regclass::oid

SELECT 'pg_catalog.pg_class'::regclass::oid

From
"Tom Hebbron"
Date:
Hi list,

test=# SELECT 'pg_catalog.pg_class'::regclass::oid;
 oid
------
 1259
(1 row)

test=# SELECT '1259'::oid::regclass;
 regclass
----------
 pg_class
(1 row)

test=# SELECT '1259'::oid::regclass::text || '.relname';
ERROR:  cannot cast type regclass to text
test=#

Could the regclass psuedo-type give schema qualified output when given an
oid, and could it be castable to text please - it would make life easier?