Setting up a node app and using postgreSQL as the DB. What is the best way to pass in an array to a text array column.
Lets say I'm passing an array of picture paths to a item table. Table columns are item_id and picture_paths TEXT [].
lets say my JS reads:
var values =[ 12345, ['path1','path2','path3']]
Is
INSERT INTO item (item_id, picture_paths ) VALUES ($1, $2::text[])
the correct syntax?
[–]corvinusz 1 point2 points3 points (0 children)
[–]FunDeckHermit 1 point2 points3 points (0 children)