You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql: fix CREATE AS [SHOW CREATE FUNCTION] job failure
Fixescockroachdb#106268
Previously `CREATE TABLE AS`/`CREATE MATERIALIZED VIEW AS` sourcing from
`SHOW CREATE FUNCTION <function>` generated a failing schema change job with a
`unknown function: f(): function undefined` error because the job runs in the
system database and functions cannot be referenced cross database.
This PR fixes this by using the original user session (which includes the
database) in the schema change job.
Release note (bug fix): Fixes the schema changer job when CREATE AS sources
from SHOW CREATE FUNCTION:
CREATE TABLE t AS SELECT * FROM [SHOW CREATE FUNCTION f];
0 commit comments