{"record":{"id":"bacb1f4dac1e95f5","repo":"JuliusBrussee/caveman","slug":"postgres-inspect-resolver-schema-w","errorCode":null,"errorMessage":"postgres: inspect resolver schema: %w","messagePattern":"postgres: inspect resolver schema: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/postgresconfig/postgresconfig.go","lineNumber":753,"sourceCode":"\t\t\tJOIN pg_roles role ON role.rolname=rr.role_name\n\t\t\tCROSS JOIN pg_class c\n\t\t\tJOIN pg_namespace n ON n.oid=c.relnamespace\n\t\t\tJOIN pg_attribute org_col ON org_col.attrelid=c.oid\n\t\t\t  AND org_col.attname='organization_id' AND NOT org_col.attisdropped\n\t\t\tWHERE n.nspname='public' AND c.relkind IN ('r','p')\n\t\t\t  AND has_table_privilege(rr.role_name, c.oid, 'SELECT,INSERT,UPDATE,DELETE')\n\t\t\t  AND NOT EXISTS (\n\t\t\t    SELECT 1 FROM pg_policy policy\n\t\t\t    WHERE policy.polrelid=c.oid\n\t\t\t      AND role.oid=ANY(policy.polroles)\n\t\t\t      AND policy.polqual IS NOT NULL\n\t\t\t      AND policy.polwithcheck IS NOT NULL\n\t\t\t  )\n\t\t)\n\t\tSELECT coalesce(string_agg(violation, '; ' ORDER BY violation), '') FROM violations\n\t`).Scan(&violations)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"postgres: inspect resolver schema: %w\", err)\n\t}\n\tif violations != \"\" {\n\t\treturn fmt.Errorf(\"postgres: resolver isolation incomplete: %s\", violations)\n\t}\n\treturn nil\n}\n\n// WithOrg runs fn inside a transaction whose tenant GUC is transaction-local.\n// Empty scopes are rejected: tenant work must never degrade to an unscoped\n// query when RLS is the hard boundary.\nfunc WithOrg(ctx context.Context, pool *pgxpool.Pool, orgID string, fn func(pgx.Tx) error) error {\n\torgID = strings.TrimSpace(orgID)\n\tif orgID == \"\" {\n\t\treturn errors.New(\"postgres: organization scope is required\")\n\t}\n\ttx, err := pool.Begin(ctx)\n\tif err != nil {\n\t\treturn err","sourceCodeStart":735,"sourceCodeEnd":771,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/postgresconfig/postgresconfig.go#L735-L771","documentation":"Error \"postgres: inspect resolver schema: %w\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/postgresconfig/postgresconfig.go:753 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the resolver schema inspection error and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}