{"record":{"id":"7ac8b41ed565de1e","repo":"jackc/pgx","slug":"circle-w","errorCode":null,"errorMessage":"Circle: %w","messagePattern":"Circle: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/circle.go","lineNumber":176,"sourceCode":"}\n\ntype scanPlanBinaryCircleToCircleScanner struct{}\n\nfunc (scanPlanBinaryCircleToCircleScanner) Scan(src []byte, dst any) error {\n\tscanner := (dst).(CircleScanner)\n\n\tif src == nil {\n\t\treturn scanner.ScanCircle(Circle{})\n\t}\n\n\trd := pgio.NewReader(src)\n\n\tx := rd.Uint64()\n\ty := rd.Uint64()\n\tr := rd.Uint64()\n\n\tif err := rd.Finish(); err != nil {\n\t\treturn fmt.Errorf(\"Circle: %w\", err)\n\t}\n\n\treturn scanner.ScanCircle(Circle{\n\t\tP:     Vec2{math.Float64frombits(x), math.Float64frombits(y)},\n\t\tR:     math.Float64frombits(r),\n\t\tValid: true,\n\t})\n}\n\ntype scanPlanTextAnyToCircleScanner struct{}\n\nfunc (scanPlanTextAnyToCircleScanner) Scan(src []byte, dst any) error {\n\tscanner := (dst).(CircleScanner)\n\n\tif src == nil {\n\t\treturn scanner.ScanCircle(Circle{})\n\t}\n","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/circle.go#L158-L194","documentation":"Wrapping error from the binary circle scan plan: after reading the three float64 components (x, y, r) the pgio.Reader still had unread bytes, meaning the binary encoding was not exactly 24 bytes. The truncated/oversized payload is the fault, not the target.","triggerScenarios":"Thrown at pgtype/circle.go:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat as protocol/data corruption — verify the column type is circle and the wire data is intact","Check for a man-in-the-middle or mismatched pgx/server versions"],"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"}