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

[YSQL] Catalog manager namespace and table name maps to contain YSQL tables #1476

Open
ndeodhar opened this issue Jun 3, 2019 · 1 comment

Comments

@ndeodhar
Copy link
Contributor

commented Jun 3, 2019

Currently, YSQL table information is maintained in namespace and table ID maps instead of namespace and table name maps and this causes problems while trying to look up tables by their names. YSQL table maps also need to store schema since the same database can have same table name in different schemas.

This is needed by CDC as well as some yb-admin commands.

@ndeodhar ndeodhar added the area/sql label Jun 3, 2019

@ndeodhar ndeodhar self-assigned this Jun 3, 2019

@ndeodhar ndeodhar added this to To do in SQL Support via automation Jun 3, 2019

@ndeodhar ndeodhar added this to To Do in YBase features via automation Jun 3, 2019

@ndeodhar ndeodhar added this to the v2.0 milestone Jul 11, 2019

@ndeodhar ndeodhar moved this from To do to In progress in SQL Support Jul 17, 2019

@m-iancu

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2019

Related issue is that those maps need to be updated when the relevant metadata is altered.
For instance, currently, after running:

postgres=# create table foo(a int);
CREATE TABLE
postgres=# alter table foo rename to bar;
ALTER TABLE
postgres=# select * from bar;
 a
---
(0 rows)

postgres=# \d
        List of relations
 Schema | Name | Type  |  Owner
--------+------+-------+----------
 public | bar  | table | postgres
(1 row)

The UI will still show the old name:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.