Instead of generating nullable query using VALUES, use UNION ALL syntax.
Current query:
SELECT NOT attnotnull FROM (
VALUES
( $1::int4, $2::int4, $3::int2 ),
( $3::int4, $4::int4, $5::int2 ),
) AS col(idx, table_id, col_idx) ...
Becomes:
SELECT NOT attnotnull FROM (
( SELECT $1::int4 AS idx, $2::int4 AS table_id, $3::int2 AS col_idx )
UNION ALL ( SELECT $1::int4, $2::int4, $3::int2 )
) AS col ...
This change allows better support for databases that support a pgwire interface but with limited SQL syntax. In particular, timeseries databases such as QuestDB and kdb are unsupported.
Instead of generating nullable query using
VALUES
, useUNION ALL
syntax.Current query:
Becomes:
This change allows better support for databases that support a
pgwire
interface but with limited SQL syntax. In particular, timeseries databases such as QuestDB and kdb are unsupported.