How to write and execute a query that inserts array values ββusing libpqxx?
INSERT INTO exampleTable(exampleArray[3]) VALUES('{1, 2, 3}');
This sample code gives me:
ERROR: syntax error at or near "'"
What's wrong? In the PostgreSQL documentation, I found that:
CREATE TABLE sal_emp ( name text, pay_by_quarter integer[], schedule text[][] );
...
INSERT INTO sal_emp VALUES ('Bill', '{10000, 10000, 10000, 10000}', '{{"meeting", "lunch"}, {"training", "presentation"}}');
postgresql
ktoΕ tam
source share