-
Notifications
You must be signed in to change notification settings - Fork 11
Description
schema.yml
...... - {name: categories, type: array, is_nullable: false} ......
somewhere in functions
local tuples = pg_connect:execute('SELECT ARRAY[1,2,3] AS categories') json.encode(tuples)
result
[ [ { "categories": "{1,2,3}" } ] ]
in right way should be like this
json.encode({categories = {1,2,3})
result
{ "categories": [ 1, 2, 3 ] }
some string from test file
t:q('SELECT ARRAY[1,2] AS arr, 1.2 AS pos', {{ arr = '{1,2}', pos = 1.2}})
so in general, when i try insert pg array type value parsed by this connecor to type: array filed, i got error.
InsertError: Failed to insert: Tuple field 14 (content_categories) type does not match one required by operation: expected array, got string
in parse_pg_value function do not realised parsing for pg array. so by default it parse it as string...