Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CockroachDB doesn't (yet) support pg_catalog.regclass #23

Closed
robins opened this issue Sep 28, 2017 · 0 comments
Closed

CockroachDB doesn't (yet) support pg_catalog.regclass #23

robins opened this issue Sep 28, 2017 · 0 comments
Labels

Comments

@robins
Copy link
Owner

robins commented Sep 28, 2017

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;
            ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant