From 5ebce2ec2f978984d608a677a45c6fc892724809 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Tue, 7 Jun 2022 12:03:13 -0400 Subject: [PATCH] sql: fix assignment of global typDelim var This fixes a bug that caused tests to fail under stress. Release note: None --- pkg/sql/pg_catalog.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/sql/pg_catalog.go b/pkg/sql/pg_catalog.go index 63ce90cb15a1..b1ad03dbb385 100644 --- a/pkg/sql/pg_catalog.go +++ b/pkg/sql/pg_catalog.go @@ -2800,7 +2800,7 @@ var ( _ = typCategoryRange _ = typCategoryBitString - typDelim = tree.NewDString(",") + commaTypDelim = tree.NewDString(",") ) func tableIDToTypeOID(table catalog.TableDescriptor) tree.Datum { @@ -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. @@ -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