Commit 74e3329
committed
fix(sql): honor declared float width across DDL, DML, and pgwire
REAL/FLOAT4/FLOAT8/DOUBLE PRECISION and their PostgreSQL aliases were
rejected as unknown column types, and even where declared, values on
untyped write paths (KV, document-schemaless) were stored as decimal
text and silently dropped by the pgwire encoder. Add a FloatWidth type
mirroring IntWidth (shared declared-type keyword matching factored
into declared_type_keyword.rs), coerce float/int literals to their
declared representation before storage, and narrow floats on the wire
with an overflow-only error, so RowDescription OIDs, catalog
introspection, and encoded values all agree with the declared width.1 parent 98c8a37 commit 74e3329
29 files changed
Lines changed: 2165 additions & 194 deletions
File tree
- nodedb-sql
- src
- placeholder_types
- planner
- resolver
- types
- tests
- nodedb-types/src/columnar
- nodedb
- src/control
- planner
- catalog_adapter
- sql_plan_convert
- server
- pgwire
- catalog
- tables
- handler
- prepared
- response_shape
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
62 | 74 | | |
63 | 75 | | |
64 | 76 | | |
| 77 | + | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| |||
100 | 114 | | |
101 | 115 | | |
102 | 116 | | |
| 117 | + | |
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
106 | | - | |
| 121 | + | |
107 | 122 | | |
108 | 123 | | |
109 | 124 | | |
110 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
111 | 136 | | |
112 | 137 | | |
113 | 138 | | |
| |||
309 | 334 | | |
310 | 335 | | |
311 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
312 | 352 | | |
313 | 353 | | |
314 | 354 | | |
| |||
418 | 458 | | |
419 | 459 | | |
420 | 460 | | |
421 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
422 | 465 | | |
423 | 466 | | |
424 | 467 | | |
425 | | - | |
| 468 | + | |
426 | 469 | | |
427 | 470 | | |
428 | 471 | | |
429 | 472 | | |
430 | 473 | | |
431 | 474 | | |
| 475 | + | |
| 476 | + | |
432 | 477 | | |
433 | 478 | | |
434 | 479 | | |
| |||
0 commit comments