MCPcopy Create free account
hub / github.com/PostHog/duckgres / queryLogColumnType

Function queryLogColumnType

server/querylog.go:507–524  ·  view source on GitHub ↗
(db *sql.DB, fullTableName, tableSchema, tableName, columnName string)

Source from the content-addressed store, hash-verified

505
506 ql := c.queryLogSink()
507 if ql == nil {
508 return
509 }
510
511 // CREATE SECRET option lists carry credential material; never persist
512 // them to the query log. The engine's error text echoes the offending SQL,
513 // so a failed CREATE SECRET leaks the credential via Exception unless the
514 // error is redacted too — classify against the original query first.
515 errMsg = boundQueryLogText(usersecrets.RedactErrorForLog(query, errMsg))
516 query = usersecrets.RedactForLog(query)
517 transpiledQuery = usersecrets.RedactForLog(transpiledQuery)
518
519 // A failure before execution began is ExceptionBeforeStart and has no
520 // QueryStart row to pair with. Without a scope we cannot know, so assume
521 // the statement started — claiming it never did would be a stronger
522 // statement than the evidence supports.
523 execStarted := true
524 scope := c.activeQueryMetrics
525 if scope != nil {
526 execStarted = scope.execStarted
527 }

Calls 2

queryLogCatalogNameFunction · 0.85
ScanMethod · 0.65