[racket] How to insert array into Postgresql using DB module
Postgresql allows
INSERT INTO sal_emp
VALUES ('Bill',
'{10000, 10000, 10000, 10000}',
'{{"meeting", "lunch"}, {"training", "presentation"}}');
I have inherited this table that is not quite normalized and has
columns that are expecting arrays.
Can I do something like following?
(query conn
"INSERT INTO sal_emp VALUES ($1, $2. $3)"
"Bill"
(list 10000 10000 10000 10000)
(list (list "meeting" "lunch") (list "training" "presentation")))
Or do I have to convert the list into a string agreeable by SQL?
Thanks in advance.
jGc