fix(sql): bind string keys untyped on Postgres so integer key columns compare (#602 STAB-24)
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
+14
@@ -80,6 +80,20 @@ VALUES (7, 180.5, 1.2, TIMESTAMP '2026-07-24 10:00:00'),
|
||||
(9, NULL, 1.6, TIMESTAMP '2026-07-24 10:00:01'),
|
||||
(8, 210.25, 1.4, TIMESTAMP '2026-07-24 10:00:02');
|
||||
|
||||
-- Integer-keyed EAV source (STAB-24): the key column is `integer`, so a key bound as the default
|
||||
-- `text` fails with "operator does not exist: integer = text". Pins the untyped-bind fix in
|
||||
-- PostgresDialect.ConfigureParameter for the key-value IN-list path (the wide-row `whereColumn`
|
||||
-- path is covered by latest_status.station_id above).
|
||||
CREATE TABLE sqlpoll.int_tag_values (
|
||||
tag_id integer NOT NULL,
|
||||
num_value double precision NULL,
|
||||
sample_ts timestamp(3) NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO sqlpoll.int_tag_values (tag_id, num_value, sample_ts)
|
||||
VALUES (101, 77.5, TIMESTAMP '2026-07-24 10:00:00'),
|
||||
(102, 12.0, TIMESTAMP '2026-07-24 10:00:01');
|
||||
|
||||
RESET ROLE;
|
||||
|
||||
-- ── grants: USAGE + SELECT and nothing else ───────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user