Closed ackava closed 1 month ago
It seems none of the types can be set except int and char through parameters. All the following queries fail with inconsistent type deduced for parameter.
pg.sql `create table mb( id bigint, updated timestamp null, primary key(id) )`; const mb = { id: 1, updated: null }; pg.sql `insert into mb(id, updated) values (${mb.id}, ${mb.updated})`;
pg.sql `create table mb( id varchar(200), updated bigint null, primary key(id) )`; const mb = { id: "1", updated: null }; pg.sql `insert into mb(id, updated) values (${mb.id}, ${mb.updated})`;
pg.sql `create table mb( id varchar(200), updated bigint null, primary key(id) )`; const mb = { id: "1", updated: 5 }; pg.sql `insert into mb(id, updated) values (${mb.id}, ${mb.updated})`;
It seems none of the types can be set except int and char through parameters. All the following queries fail with inconsistent type deduced for parameter.