SELECT 'pg_catalog.pg_class'::regclass::oid - Mailing list pgsql-general

From Tom Hebbron
Subject SELECT 'pg_catalog.pg_class'::regclass::oid
Date
Msg-id bpjbcq$v0j$1@news.hub.org
Whole thread Raw
List pgsql-general
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?



pgsql-general by date:

Previous
From: semmelhaacknospam@gmx.de (tim)
Date:
Subject: Connecting Openoffice Postgres
Next
From: "Markus Seibold"
Date:
Subject: Open source data modeling tools for PostgreSQL