CREATE TYPE complex AS (
start_time timestamp,
amount int,
);
Given a variable
my_complexes complex[]
how do you query it like a table?
SELECT amount FROM my_complexes;
Gives "relation does not exist".
SELECT mc.amount FROM (SELECT my_complexes) mc;
Gives "amount does not exist".
In case it is relevant, my_complexes is passed in as a parameter of a function. I want to then select on that array.
You should use:
Full example: