Skip to content

Commit e01b2d3

Browse files
committed
opt: warn about performance of (*optCatalog).FullyQualifiedName
Release note: None
1 parent 1997571 commit e01b2d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/sql/opt_catalog.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,12 @@ func (oc *optCatalog) UserHasGlobalPrivilegeOrRoleOption(
530530
}
531531

532532
// FullyQualifiedName is part of the cat.Catalog interface.
533+
//
534+
// Note that:
535+
// - this call may involve a database operation so it shouldn't be used in
536+
// performance sensitive paths;
537+
// - the fully qualified name of a data source object can change without the
538+
// object itself changing (e.g. when a database is renamed).
533539
func (oc *optCatalog) FullyQualifiedName(
534540
ctx context.Context, ds cat.DataSource,
535541
) (cat.DataSourceName, error) {

0 commit comments

Comments
 (0)