diff --git a/pkg/sql/sem/cast/cast_map.go b/pkg/sql/sem/cast/cast_map.go index 3e7b1c90087d..5a5d58a5680a 100644 --- a/pkg/sql/sem/cast/cast_map.go +++ b/pkg/sql/sem/cast/cast_map.go @@ -493,7 +493,7 @@ var castMap = map[oid.Oid]map[oid.Oid]Cast{ }, oid.T_name: { oid.T_bpchar: {MaxContext: ContextAssignment, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, - oid.T_text: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, + oid.T_text: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.LeakProof}, oid.T_varchar: {MaxContext: ContextAssignment, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, // Automatic I/O conversions to string types. oid.T_char: {MaxContext: ContextAssignment, origin: ContextOriginAutomaticIOConversion, Volatility: volatility.Immutable}, @@ -720,7 +720,7 @@ var castMap = map[oid.Oid]map[oid.Oid]Cast{ oid.T_bpchar: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, oid.T_char: {MaxContext: ContextAssignment, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, oidext.T_geometry: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, - oid.T_name: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.Immutable}, + oid.T_name: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.LeakProof}, oid.T_regclass: {MaxContext: ContextImplicit, origin: ContextOriginPgCast, Volatility: volatility.Stable}, // We include a TEXT->TEXT entry to mimic the VARCHAR->VARCHAR entry // that is included in the pg_cast table. Postgres doesn't include a diff --git a/pkg/sql/sem/cast/testdata/pg_cast_dump.csv b/pkg/sql/sem/cast/testdata/pg_cast_dump.csv index db4a657872ad..3f982c9e5949 100644 --- a/pkg/sql/sem/cast/testdata/pg_cast_dump.csv +++ b/pkg/sql/sem/cast/testdata/pg_cast_dump.csv @@ -7,7 +7,7 @@ castsource|casttarget|provolatile|proleakproof|castcontext|pg_version 18|25|i|f|i|13.5 18|1042|i|f|a|13.5 18|1043|i|f|a|13.5 -19|25|i|f|i|13.5 +19|25|i|t|i|14.2 19|1042|i|f|a|13.5 19|1043|i|f|a|13.5 20|21|i|f|a|13.5 @@ -57,7 +57,7 @@ castsource|casttarget|provolatile|proleakproof|castcontext|pg_version 23|1700|i|f|i|13.5 24|20|i|f|a|13.5 25|18|i|f|a|13.5 -25|19|i|f|i|13.5 +25|19|i|t|i|14.2 25|142|s|f|e|13.5 25|2205|s|f|i|13.5 26|20|i|f|a|13.5