I am encountering errors for a simple Query of a Postgres table containing arrays. I suspect either arrays are not supported, or I am doing something wrong?
Any advise greatly appreciated - thanks in advance.
#Sample Code where voltage and current columns are arrays
query = “”"
SELECT
test_id,
voltage,
current
FROM ivcurves
WHERE ivcurves.test_id = 861;
“”"
data = system.db.runQuery(query,database = ‘ds_flashtester01’)
post submit edit
I just found reference to the Postgres UNNEST function within the Query, so I now have a working query!
SELECT
test_id,
UNNEST(ARRAY[voltage]),
UNNEST(ARRAY[current])
FROM ivcurves
WHERE ivcurves.test_id = 861;
Any other advice would still be appreciated