Re: Composite types as parameters

2021-06-28 Thread Elijah Stone
On Sun, 27 Jun 2021, Tom Lane wrote: You should let the server infer its type, instead, which it can easily do from context in this example. That is, pass zero as the type OID, or leave out the paramTypes Ah, thank you, that works brilliantly. Sorry for the noise! -E

Re: Composite types as parameters

2021-06-26 Thread Elijah Stone
On Sat, 26 Jun 2021, Tom Lane wrote: You probably would have better results from specifying the composite type explicitly in the query: PQexecParams("insert into sometable values($1::composite, ...);", I gather from the complaint that you're currently doing something that causes the Param to

Composite types as parameters

2021-06-26 Thread Elijah Stone
Hello all, I am trying to add support for composite types to my ORM, which uses libpq and the binary format. Given a schema like this one: create type composite as (...); create table sometable (field composite, ...); I want to execute a query like this: PQexecParams("insert into sometable