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

From: "Tom Hebbron" <news_user(at)hebbron(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SELECT 'pg_catalog.pg_class'::regclass::oid
Date: 2003-11-20 20:37:53
Message-ID: bpjbcq$v0j$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Browse pgsql-general by date

  From Date Subject
Next Message Rick Gigger 2003-11-20 20:41:13 Re: performance problem
Previous Message Andrei Ivanov 2003-11-20 20:33:52 Re: ERROR: nodeRead: did not find '}' [x2]