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

Function parseExtensionName

server/server.go:1353–1358  ·  view source on GitHub ↗

parseExtensionName splits an extension string into its name and install command. For "cache_httpfs FROM community", returns ("cache_httpfs", "cache_httpfs FROM community"). For "ducklake", returns ("ducklake", "ducklake").

(ext string)

Source from the content-addressed store, hash-verified

1351 chsql.InitMacros(db)
1352
1353 // Attach DuckLake catalog if configured (but don't set as default yet)
1354 duckLakeMode := false
1355 tryEnsurePostgresQueryLogStorageBeforeDuckLakeAttach(cfg)
1356 if err := AttachDuckLake(db, cfg.DuckLake, duckLakeSem, cfg.DataDir); err != nil {
1357 // If DuckLake was explicitly configured, fail the connection.
1358 // Silent fallback to local DB causes schema/table mismatches.
1359 if cfg.DuckLake.MetadataStore != "" {
1360 return fmt.Errorf("DuckLake configured but attachment failed: %w", err)
1361 }

Callers 3

loadExtensionsWithFunction · 0.85
hasCacheHTTPFSFunction · 0.85
TestParseExtensionNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseExtensionNameFunction · 0.68