-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: pg_catalog.pg_get_viewdef broken for materialized views #88109
Copy link
Copy link
Closed
Labels
A-sql-builtinsSQL built-in functions and semantics thereof.SQL built-in functions and semantics thereof.A-sql-pgcatalogA-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
Needed for #88061.
Describe the problem
pg_get_viewdef() returns NULL on materialized views.
In PostgreSQL, it returns the view definition.
To Reproduce
create materialized view foo as select 123;
select pg_get_viewdef(oid) from pg_class c where c.relname = 'foo';cc @rafiss for triage
Jira issue: CRDB-19693
Epic: CRDB-23454
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-builtinsSQL built-in functions and semantics thereof.SQL built-in functions and semantics thereof.A-sql-pgcatalogA-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.