From f16fca8e71c445491fb1dd3e9cbd420312633d59 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 4 Oct 2024 19:52:32 +0800 Subject: [PATCH] fix: fix slice init length --- postgres/parser/sem/tree/pretty.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/parser/sem/tree/pretty.go b/postgres/parser/sem/tree/pretty.go index 4074878b3c..d3c55f0ab7 100644 --- a/postgres/parser/sem/tree/pretty.go +++ b/postgres/parser/sem/tree/pretty.go @@ -1125,7 +1125,7 @@ func (p *PrettyCfg) exprDocWithParen(e Expr) pretty.Doc { } func (node *Update) doc(p *PrettyCfg) pretty.Doc { - items := make([]pretty.TableRow, 8) + items := make([]pretty.TableRow, 0, 8) items = append(items, node.With.docRow(p), p.row("UPDATE", p.Doc(node.Table)), @@ -1143,7 +1143,7 @@ func (node *Update) doc(p *PrettyCfg) pretty.Doc { } func (node *Delete) doc(p *PrettyCfg) pretty.Doc { - items := make([]pretty.TableRow, 6) + items := make([]pretty.TableRow, 0, 6) items = append(items, node.With.docRow(p), p.row("DELETE FROM", p.Doc(node.Table)),