Closed bzdula closed 2 years ago
Your type_stmt query has one parameter - the composite type that exists for every table. The copy query is instead expecting every column in the table as separate parameters.
I think changing your type_stmt to SELECT * FROM {}
and looking at stmt.columns()
should give you what you need.
Yes! That was it, than you very much, I sorta misunderstood the #681, and assumed that Composites are automatically broken down into base types
Hi, I have a large amount of data that i would like to insert with
copy_in
method. Beforahand i want to say that I am able to use them in regular queries and such, so there shouldn't be problem with definitions [I hope]. Let say i have structure[s]:with corresponding sql definition:
When i try to perform a following code:
I recieve following error:
If i change
write
to use my macroThe error changes to:
I feel like I almost understand it, so can you please point out what exactly I am doing wrong here? Thanks, and thank you for your fantastic library :clap: . PS. I've attatched the
{:?}
dump of types variable types.txt