Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: fix assignment of global typDelim var #82526

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/sql/pg_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -2800,7 +2800,7 @@ var (
_ = typCategoryRange
_ = typCategoryBitString

typDelim = tree.NewDString(",")
commaTypDelim = tree.NewDString(",")
)

func tableIDToTypeOID(table catalog.TableDescriptor) tree.Datum {
Expand Down Expand Up @@ -2833,7 +2833,7 @@ func addPGTypeRowForTable(
typCategoryComposite, // typcategory
tree.DBoolFalse, // typispreferred
tree.DBoolTrue, // typisdefined
typDelim, // typdelim
commaTypDelim, // typdelim
tableOid(table.GetID()), // typrelid
oidZero, // typelem
// NOTE: we do not add the array type or OID here.
Expand Down Expand Up @@ -2902,7 +2902,7 @@ func addPGTypeRow(
typType = typTypePseudo
}
typname := typ.PGName()
typDelim = tree.NewDString(typ.Delimiter())
typDelim := tree.NewDString(typ.Delimiter())
return addRow(
tree.NewDOid(tree.DInt(typ.Oid())), // oid
tree.NewDName(typname), // typname
Expand Down