forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
CockroachDB doesn't (yet) support pg_catalog.regclass #23
Copy link
Copy link
Closed
Labels
Description
There is a lot of small ifs becoming mandatory to get OID from a relation name.
Apparently Cockroachdb doesn't (yet) support pg_catalog.regclass (when casting at least) although regclass works fine. It would ideally be best if CockroachDB could (eventually) support this, to avoid namespace clashes.
In Postgres
postgres2=> select 'a'::regclass::OID;
oid
----------
20041642
(1 row)
postgres2=> select 'a'::pg_catalog.regclass::OID;
oid
----------
20041642
(1 row)
In CockroachDB
bank=> \d a
Table "bank.a"
Column | Type | Collation | Nullable | Default
--------+--------+-------------------+----------+---------
b | bigint | Not Supported Yet | |
Indexes:
"primary" PRIMARY KEY, (Not Supported Yet)
bank=> select 'a'::regclass::OID;
'a'::REGCLASS::OID
--------------------
818765073
(1 row)
bank=> select 'a'::pg_catalog.regclass::OID;
ERROR: syntax error at or near "pg_catalog"
select 'a'::pg_catalog.regclass::OID;
^
Reactions are currently unavailable