Skip to content

Commit

Permalink
builtins: block gateway_region from DistSQL
Browse files Browse the repository at this point in the history
It is not safe to execute this in DistSQL as we always want the region
of the gateway to be the return value here.

Release justification: safety change

Release note: None
  • Loading branch information
otan committed Aug 31, 2021
1 parent 0c50eee commit d7100c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/sql/sem/builtins/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -5751,7 +5751,11 @@ value if you rely on the HLC for accuracy.`,
),

GatewayRegionBuiltinName: makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
// We should always evaluate this built-in at the gateway.
DistsqlBlocklist: true,
},
tree.Overload{
Types: tree.ArgTypes{},
ReturnType: tree.FixedReturnType(types.String),
Expand Down

0 comments on commit d7100c5

Please sign in to comment.