{"record":{"id":"9e609258ba1866ca","repo":"jackc/pgx","slug":"point-w","errorCode":null,"errorMessage":"point: %w","messagePattern":"point: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/point.go","lineNumber":229,"sourceCode":"\treturn point, nil\n}\n\ntype scanPlanBinaryPointToPointScanner struct{}\n\nfunc (scanPlanBinaryPointToPointScanner) Scan(src []byte, dst any) error {\n\tscanner := (dst).(PointScanner)\n\n\tif src == nil {\n\t\treturn scanner.ScanPoint(Point{})\n\t}\n\n\tr := pgio.NewReader(src)\n\n\tx := r.Uint64()\n\ty := r.Uint64()\n\n\tif err := r.Finish(); err != nil {\n\t\treturn fmt.Errorf(\"point: %w\", err)\n\t}\n\n\treturn scanner.ScanPoint(Point{\n\t\tP:     Vec2{math.Float64frombits(x), math.Float64frombits(y)},\n\t\tValid: true,\n\t})\n}\n\ntype scanPlanTextAnyToPointScanner struct{}\n\nfunc (scanPlanTextAnyToPointScanner) Scan(src []byte, dst any) error {\n\tscanner := (dst).(PointScanner)\n\n\tif src == nil {\n\t\treturn scanner.ScanPoint(Point{})\n\t}\n\n\tif len(src) < 5 {","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/point.go#L211-L247","documentation":"After reading the two float64 coordinates of a binary-format point, the pgio.Reader found leftover unread bytes (r.Finish() failed). The server sent a point payload that is not exactly 16 bytes, so the decoded x/y pair cannot be trusted.","triggerScenarios":"Thrown at pgtype/point.go:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat the value as corrupt: discard the partial Point and surface the error to the caller","Verify the column type is actually PostgreSQL point and the wire format negotiated is binary","Log the offending payload length to identify middleware or a proxy rewriting the data"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}