{"id":"501577c59a709628","repo":"jackc/pgx","slug":"cannot-identify-server-version-in-q","errorCode":null,"errorMessage":"Cannot identify server version in %q","messagePattern":"Cannot identify server version in %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"derived_types.go","lineNumber":260,"sourceCode":"\t\t\tresult = append(result, nspType)\n\t\t}\n\t\tresult = append(result, type_)\n\t}\n\n\tif err := rows.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"While processing rows: %w\", err)\n\t}\n\n\treturn result, nil\n}\n\n// serverVersion returns the postgresql server version.\nfunc serverVersion(c *Conn) (int64, error) {\n\tserverVersionStr := c.PgConn().ParameterStatus(\"server_version\")\n\tserverVersionStr = regexp.MustCompile(`^[0-9]+`).FindString(serverVersionStr)\n\t// if not PostgreSQL do nothing\n\tif serverVersionStr == \"\" {\n\t\treturn 0, fmt.Errorf(\"Cannot identify server version in %q\", serverVersionStr)\n\t}\n\n\tversion, err := strconv.ParseInt(serverVersionStr, 10, 64)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"postgres version parsing failed: %w\", err)\n\t}\n\treturn version, nil\n}\n","sourceCodeStart":242,"sourceCodeEnd":269,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/derived_types.go#L242-L269","documentation":"Error \"Cannot identify server version in %q\" thrown in jackc/pgx.","triggerScenarios":"Thrown at derived_types.go:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}