FQString renders the table name in full, not omitting the prefix schema and catalog names. Suitable for logging, etc.
()
| 77 | // FQString renders the table name in full, not omitting the prefix |
| 78 | // schema and catalog names. Suitable for logging, etc. |
| 79 | func (o *objName) FQString() string { |
| 80 | ctx := NewFmtCtx(FmtSimple) |
| 81 | schemaName := o.SchemaName.String() |
| 82 | // The pg_catalog and pg_extension schemas cannot be referenced from inside |
| 83 | // an anonymous ("") database. This makes their FQ string always relative. |
| 84 | if schemaName != catconstants.PgCatalogName && schemaName != catconstants.PgExtensionSchemaName { |
| 85 | ctx.FormatNode(&o.CatalogName) |
| 86 | ctx.WriteByte('.') |
| 87 | } |
| 88 | ctx.FormatNode(&o.SchemaName) |
| 89 | ctx.WriteByte('.') |
| 90 | ctx.FormatNode(&o.ObjectName) |
| 91 | return ctx.CloseAndGetString() |
| 92 | } |
| 93 | |
| 94 | // Format implements the NodeFormatter interface. |
| 95 | func (o *objName) Format(ctx *FmtCtx) { |
nothing calls this directly
no test coverage detected