MCPcopy Create free account

hub / github.com/PostHog/duckgres / functions

Functions5,901 in github.com/PostHog/duckgres

↓ 1 callersFunctionbuildDuckLakeShowCreate
buildDuckLakeShowCreate generates a query that enriches the base CREATE TABLE DDL with PARTITIONED BY from DuckLake metadata. The partition info is st
transpiler/show_create.go:82
↓ 1 callersMethodbuildInsertClause
buildInsertClause creates WHEN NOT MATCHED THEN INSERT clause
transpiler/transform/onconflict.go:346
↓ 1 callersMethodbuildJoinCondition
buildJoinCondition creates the ON condition for MERGE
transpiler/transform/onconflict.go:257
↓ 1 callersFunctionbuildManagedWarehouseObjectStore
(s3 configstore.ManagedWarehouseS3)
controlplane/shared_worker_activator.go:633
↓ 1 callersFunctionbuildSessionInformationSchemaColumnsViewSQL
()
server/sessionmeta/sessionmeta.go:638
↓ 1 callersFunctionbuildSessionInformationSchemaSchemataViewSQL
()
server/sessionmeta/sessionmeta.go:841
↓ 1 callersFunctionbuildSessionInformationSchemaTablesViewSQL
()
server/sessionmeta/sessionmeta.go:802
↓ 1 callersFunctionbuildSessionInformationSchemaViewsViewSQL
()
server/sessionmeta/sessionmeta.go:874
↓ 1 callersFunctionbuildSessionPgAttributeViewSQL
()
server/sessionmeta/sessionmeta.go:508
↓ 1 callersFunctionbuildSessionPgClassViewSQL
()
server/sessionmeta/sessionmeta.go:240
↓ 1 callersFunctionbuildSessionPgDatabaseViewSQL
(database string)
server/sessionmeta/sessionmeta.go:164
↓ 1 callersFunctionbuildSessionPgNamespaceViewSQL
()
server/sessionmeta/sessionmeta.go:427
↓ 1 callersFunctionbuildSessionPgSequencesViewSQL
buildSessionPgSequencesViewSQL builds the catalog-scoped pg_catalog.pg_sequences compat view (same cross-catalog-leak rationale as buildSessionPgTable
server/sessionmeta/sessionmeta.go:613
↓ 1 callersFunctionbuildSessionPgTablesViewSQL
buildSessionPgTablesViewSQL builds the catalog-scoped pg_catalog.pg_tables compat view. DuckDB's native pg_tables spans EVERY attached catalog and ign
server/sessionmeta/sessionmeta.go:558
↓ 1 callersFunctionbuildSessionPgViewsViewSQL
buildSessionPgViewsViewSQL builds the catalog-scoped pg_catalog.pg_views compat view (same cross-catalog-leak rationale as buildSessionPgTablesViewSQL
server/sessionmeta/sessionmeta.go:586
↓ 1 callersMethodbuildSourceSelect
buildSourceSelect creates a SELECT statement from VALUES for use as MERGE source
transpiler/transform/onconflict.go:163
↓ 1 callersMethodbuildUpdateClause
buildUpdateClause creates WHEN MATCHED THEN UPDATE clause
transpiler/transform/onconflict.go:326
↓ 1 callersFunctionbullet_list
(items: Iterable[str], limit: int = 8)
scripts/test_impact_plan.py:483
↓ 1 callersFunctioncastToVarchar
(arg *pg_query.Node)
transpiler/transform/functions_compat.go:302
↓ 1 callersFunctioncatalogErrorCode
catalogErrorCode narrows a "Catalog Error: …" message to a specific SQLSTATE
server/conn_errors.go:161
↓ 1 callersFunctionceilDiv
(a, b int64)
controlplane/headroom.go:297
↓ 1 callersFunctioncellToString
(v: unknown)
controlplane/admin/ui/src/components/JsonView.tsx:5
↓ 1 callersFunctionchangeRole
(op: Operator, role: Role)
controlplane/admin/ui/src/pages/ConfigStore.tsx:265
↓ 1 callersMethodcheckReservedWorkerLiveness
(ctx context.Context, worker *ManagedWorker)
controlplane/k8s_pool_acquire.go:703
↓ 1 callersFunctionclassifyErrorCodeOrEmpty
classifyErrorCodeOrEmpty is a test helper to surface the computed SQLSTATE in failure messages without crashing on nil errors.
server/transient_test.go:434
↓ 1 callersMethodcleanup
(t *testing.T)
tests/controlplane/controlplane_test.go:259
↓ 1 callersMethodcleanup
()
tests/perf/harness_test.go:373
↓ 1 callersFunctioncleanupDDLTables
Helper to cleanup DDL test tables
tests/integration/ddl_test.go:407
↓ 1 callersMethodcleanupDeadWorker
cleanupDeadWorker releases resources for a worker whose process has already exited. Called from cleanDeadWorkersLocked when a dead worker is discovere
controlplane/worker_mgr.go:931
↓ 1 callersMethodcleanupDuckLakeTables
cleanupDuckLakeTables drops existing tables in DuckLake before loading fixtures
tests/integration/harness.go:421
↓ 1 callersMethodcleanupLoop
cleanupLoop periodically cleans up expired records.
server/auth/ratelimit.go:243
↓ 1 callersMethodcleanupOrgConnectionRowsLocked
(tx *gorm.DB, orgID string, now time.Time)
controlplane/configstore/org_connections.go:436
↓ 1 callersMethodcleanupPostgresRuntimeSchemas
()
tests/integration/harness.go:377
↓ 1 callersMethodcleanupUnregisteredWorkerSession
(worker *ManagedWorker, sessionToken string)
controlplane/session_mgr.go:635
↓ 1 callersMethodclientIP
clientIP returns the connection's client IP as a string, or "" if unavailable (e.g. a non-TCP conn or in tests). Used for the redacted Errors-page sna
server/conn.go:564
↓ 1 callersFunctioncloneWorkerLifecycleStats
(stats []configstore.WorkerLifecycleStats)
controlplane/multitenant.go:634
↓ 1 callersFunctioncloneWorkerProfile
(profile *WorkerProfile)
controlplane/worker_state.go:237
↓ 1 callersMethodcloseAndWait
()
controlplane/session_lifecycle.go:82
↓ 1 callersFunctioncoalesceNode
coalesceNode builds a COALESCE(...) expression. COALESCE is grammar syntax, not a callable function — a plain FuncCall would deparse quoted and fail.
transpiler/transform/functions_compat.go:280
↓ 1 callersFunctioncode_detail
(value: str)
scripts/test_impact_plan.py:478
↓ 1 callersFunctioncollectOperatorTimings
collectOperatorTimings walks the operator tree and sums timings by category. pgScanTime/pgScanRows are a strict subset of scanTime/scanRows: postgres_
server/observe/tracing.go:103
↓ 1 callersMethodcommandEnv
(spec stepSpec)
tests/scenario/dbt/steps.go:233
↓ 1 callersFunctioncommandsFromStep
(step core.Step)
tests/scenario/dbt/steps.go:256
↓ 1 callersMethodcommitTx
(tx *sql.Tx)
duckdbservice/service.go:455
↓ 1 callersFunctioncompactRunID
(runID string)
tests/scenario/runner_test.go:563
↓ 1 callersFunctioncompareResults
compareResults compares two query results
tests/integration/compare.go:225
↓ 1 callersFunctioncompareValues
compareValues compares two values for sorting
tests/integration/compare.go:520
↓ 1 callersMethodcompatViewName
(relname string)
transpiler/transform/information_schema.go:228
↓ 1 callersMethodcompleteAcquireBoundToRequester
completeAcquireBoundToRequester runs the slow spawn/adopt + activation for the claim this waiter owns. The work runs under a context DETACHED from the
controlplane/org_reserved_pool.go:210
↓ 1 callersMethodconnectDuckgres
connectDuckgres connects to the Duckgres server
tests/integration/harness.go:227
↓ 1 callersMethodconnectPostgres
connectPostgres connects to the PostgreSQL container
tests/integration/harness.go:196
↓ 1 callersMethodconnectWorker
(ctx context.Context, podName, podIP, bearerToken string)
controlplane/k8s_pool_acquire.go:639
↓ 1 callersMethodconnectWorkerDirect
connectWorkerDirect establishes a gRPC connection without running a health check. Used for hot-idle adoption where the worker's epoch/CP metadata does
controlplane/k8s_pool_acquire.go:646
↓ 1 callersMethodconnectWorkerWithHealthCheck
(ctx context.Context, podName, podIP, bearerToken string, hcPayload server.WorkerHealthCheckPayload)
controlplane/k8s_pool_acquire.go:684
↓ 1 callersFunctionconstantTimeStringEqual
(a, b string)
server/auth/policy.go:65
↓ 1 callersFunctionconstraintErrorCode
constraintErrorCode narrows a "Constraint Error: …" message to one of the integrity_constraint_violation family codes. DuckDB's messages name the viol
server/conn_errors.go:226
↓ 1 callersFunctionconsumeQuotedIdent
consumeQuotedIdent parses a double-quoted identifier starting at sql[start] == '"'. It returns the index just past the closing quote and the decoded i
transpiler/longident.go:286
↓ 1 callersFunctioncontainerStatusLogAttrs
(status corev1.ContainerStatus)
controlplane/k8s_pool_helpers.go:257
↓ 1 callersFunctioncontains
contains checks if a string slice contains a value
tests/integration/compare.go:578
↓ 1 callersFunctioncontainsAll
(values []string, wants ...string)
tests/scenario/dbt/runner_test.go:216
↓ 1 callersFunctioncontainsBitStringLiteral
containsBitStringLiteral reports whether the (upper-cased) SQL contains a bit-string literal B'..'. The B must be a standalone token (not preceded by
transpiler/transpiler.go:743
↓ 1 callersFunctioncontainsString
(values []string, target string)
server/flightsqlingress/ingress.go:2272
↓ 1 callersMethodcontextForStep
(ctx context.Context, step Step)
tests/scenario/core/runner.go:222
↓ 1 callersFunctioncontextWithOptionalTimeout
(ctx context.Context, timeout time.Duration)
tests/scenario/provision/client.go:244
↓ 1 callersFunctionconversionErrorCode
conversionErrorCode narrows a "Conversion Error: …" message. DuckDB uses this prefix for both invalid text representations and numeric overflows durin
server/conn_errors.go:212
↓ 1 callersMethodconvertSerialType
convertSerialType converts SERIAL types to INTEGER types
transpiler/transform/ddl.go:257
↓ 1 callersFunctioncopyFile
(srcPath, dstPath string, mode os.FileMode)
server/server.go:1154
↓ 1 callersMethodcountActiveOrgConnectionLeases
(tx *gorm.DB, orgID string)
controlplane/configstore/org_connections.go:461
↓ 1 callersMethodcountOrgAdmittingWorkers
(tx *gorm.DB, orgID, image, profileCPU, profileMemory string)
controlplane/configstore/store.go:1603
↓ 1 callersFunctioncrash_pc
crash_pc extracts the faulting instruction pointer from the signal context where we know the layout; 0 elsewhere. Even a shallow backtrace plus this P
internal/crashhandler/handler.c:54
↓ 1 callersFunctioncrash_signame
internal/crashhandler/handler.c:73
↓ 1 callersMethodcreateDBConnection
createDBConnection creates a DuckDB connection for a client session. This is a thin wrapper around CreateDBConnection using the server's config.
server/server.go:771
↓ 1 callersMethodcreateDefaultValueSelect
createDefaultValueSelect creates a SELECT 'value' AS name statement
transpiler/transform/setshow.go:501
↓ 1 callersMethodcreateGetVariableSelect
createGetVariableSelect creates a SELECT getvariable('name') AS name statement
transpiler/transform/setshow.go:608
↓ 1 callersMethodcreateJSONConcatExpr
createJSONConcatExpr rewrites `a || b` (with a JSON-looking operand) to a CASE expression reproducing Postgres jsonb || semantics in DuckDB: object
transpiler/transform/operators.go:756
↓ 1 callersMethodcreateJSONContainsFuncCall
createJSONContainsFuncCall rewrites `a @> b` to json_contains(a, b), matching Postgres jsonb containment for the common object/array cases.
transpiler/transform/operators.go:863
↓ 1 callersMethodcreateLateralJoin
createLateralJoin creates a LATERAL subquery for the array expansion
transpiler/transform/expandarray.go:516
↓ 1 callersMethodcreateOrgConnectionLease
(tx *gorm.DB, request *OrgConnectionQueueEntry, now time.Time)
controlplane/configstore/org_connections.go:342
↓ 1 callersMethodcreatePodWithBackoff
createPodWithBackoff creates a pod, retrying transient K8s API errors with exponential backoff (500ms, 1s, 2s, 4s).
controlplane/k8s_pool_spawn.go:422
↓ 1 callersMethodcreateRegclassFromNameSubquery
createRegclassFromNameSubquery creates a SubLink for 'tablename'::regclass or 'tablename'::text::regclass This converts: 'users'::regclass or 'users':
transpiler/transform/typecast.go:326
↓ 1 callersMethodcreateRegclassFromOidSubquery
createRegclassFromOidSubquery creates a SubLink for oid::regclass This converts: 12345::regclass To: (SELECT relname FROM pg_class_full WHERE oid = 12
transpiler/transform/typecast.go:444
↓ 1 callersMethodcreateSettingsLookupSelect
createSettingsLookupSelect creates: SELECT value AS <name> FROM duckdb_settings() WHERE name = '<name>' Used for passthrough params where DuckDB's
transpiler/transform/setshow.go:529
↓ 1 callersMethodcreateTXTRecord
(ctx context.Context, name, value string)
server/tlscert/acme_dns.go:347
↓ 1 callersMethodcreateUser
(c *gin.Context)
controlplane/admin/api.go:1017
↓ 1 callersFunctioncurrentKubeContext
currentKubeContext returns `kubectl config current-context`, or "" if kubectl is unavailable / no context is set (banner simply hidden).
controlplane/admin/devserver/main.go:214
↓ 1 callersFunctioncurrentPublisherConfig
()
tests/perf/harness_test.go:196
↓ 1 callersMethoddebounceLoop
debounceLoop runs in a background goroutine and coalesces rebalance requests.
controlplane/memory_rebalancer.go:120
↓ 1 callersFunctiondecimalToBigInt
(val decimal128.Num, dt *arrow.Decimal128Type)
server/flightclient/flight_executor.go:828
↓ 1 callersFunctiondecodeJWTClaims
decodeJWTClaims base64url-decodes the payload segment of a JWT into a claims map. It does not verify the signature (see identityFromOIDC).
controlplane/admin/authz.go:215
↓ 1 callersFunctiondecodeStrictWarehouseRequest
decodeStrictWarehouseRequest validates a PUT body by decoding it into managedWarehouseRequest with DisallowUnknownFields. This whitelists which top-le
controlplane/admin/api.go:501
↓ 1 callersFunctiondedupeQueryLogEntriesByEventID
(entries []QueryLogEntry)
server/querylog_kafka_writer.go:784
↓ 1 callersMethoddefaultFlightServerName
(orgID string)
tests/scenario/perf/steps.go:295
↓ 1 callersFunctiondefaultManifestPath
(catalogPath string)
tests/perf/harness_test.go:191
↓ 1 callersFunctiondefaultRunID
(s core.Scenario)
tests/scenario/runner_test.go:489
↓ 1 callersFunctiondefaultRunID
(s Scenario, startedAt time.Time)
tests/scenario/core/runner.go:250
↓ 1 callersFunctiondefaultStaticDir
defaultStaticDir resolves the static dir relative to the repo layout so the server can be run from the repo root with no flags.
controlplane/admin/devserver/main.go:253
↓ 1 callersMethoddeleteOperator
(c *gin.Context)
controlplane/admin/operators_api.go:119
↓ 1 callersMethoddeleteOrg
(c *gin.Context)
controlplane/admin/api.go:658
↓ 1 callersMethoddeleteRetiredRuntimeWorker
deleteRetiredRuntimeWorker performs the post-CAS cleanup for a worker whose runtime-store row is already terminal. It intentionally avoids another DB
controlplane/k8s_pool_lifecycle.go:292
↓ 1 callersMethoddeleteToSelect
deleteToSelect converts DELETE...WHERE...RETURNING to equivalent SELECT
transpiler/transform/writablecte.go:522
← previousnext →2,201–2,300 of 5,901, ranked by callers