Skip to content

Commit 459bce1

Browse files
committed
sql: use more appropriate format option for concat and concat_ws
The use of `tree.FmtPgwireText` flags in the implementations for the `concat` and `concat_ws` is misleading, even if it behaves correctly. The built-ins now use the more appropriate `tree.FmtBareStrings` flags. Release note: None
1 parent 7d1a619 commit 459bce1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/sql/sem/builtins/builtins.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ var regularBuiltins = map[string]builtinDefinition{
444444
Types: tree.VariadicType{VarType: types.Any},
445445
ReturnType: tree.FixedReturnType(types.String),
446446
Fn: func(_ context.Context, _ *eval.Context, args tree.Datums) (tree.Datum, error) {
447-
ctx := tree.NewFmtCtx(tree.FmtPgwireText)
447+
ctx := tree.NewFmtCtx(tree.FmtBareStrings)
448448
for _, d := range args {
449449
if d == tree.DNull {
450450
continue
@@ -485,7 +485,7 @@ var regularBuiltins = map[string]builtinDefinition{
485485
return tree.DNull, nil
486486
}
487487
sep := tree.MustBeDString(args[0])
488-
ctx := tree.NewFmtCtx(tree.FmtPgwireText)
488+
ctx := tree.NewFmtCtx(tree.FmtBareStrings)
489489
prefix := false
490490
for _, d := range args[1:] {
491491
if d == tree.DNull {

0 commit comments

Comments
 (0)