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

Alter Name of schema doesn't change the MV/SINK definition under the schema. #19749

Open
KeXiangWang opened this issue Dec 10, 2024 · 0 comments
Labels
type/bug Something isn't working
Milestone

Comments

@KeXiangWang
Copy link
Contributor

KeXiangWang commented Dec 10, 2024

Describe the bug

As titled.

Error message/log

No response

To Reproduce

CREATE SCHEMA foo;

CREATE MATERIALIZED VIEW foo.bar AS SELECT t0 FROM UNNEST('{a,b,c}'::CHARACTER VARYING[]) t0;

CREATE MATERIALIZED VIEW foo.bar_upcase AS SELECT UPPER(t0) AS t0 FROM foo.bar;

SELECT rw_relations.id, rw_schemas.name AS schema_name, rw_relations.name AS view_name, rw_relations.definition FROM rw_relations JOIN rw_schemas ON rw_schemas.id = rw_relations.schema_id WHERE rw_schemas.name NOT IN ('rw_catalog', 'pg_catalog', 'information_schema');

ALTER SCHEMA foo RENAME TO fizz;

-- should update `definition`, but does not
SELECT rw_relations.id, rw_schemas.name AS schema_name, rw_relations.name AS view_name, rw_relations.definition FROM rw_relations JOIN rw_schemas ON rw_schemas.id = rw_relations.schema_id WHERE rw_schemas.name NOT IN ('rw_catalog', 'pg_catalog', 'information_schema');

Expected behavior

CREATE MATERIALIZED VIEW fizz.bar_upcase AS SELECT UPPER(t0) AS t0 FROM fizz.bar

But actually it's still

CREATE MATERIALIZED VIEW foo.bar_upcase AS SELECT UPPER(t0) AS t0 FROM foo.bar

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@KeXiangWang KeXiangWang added the type/bug Something isn't working label Dec 10, 2024
@github-actions github-actions bot added this to the release-2.2 milestone Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant