I have a postgres database. Inside "match" table I store a JSONB like this one, inside "when" column:
{{"end": "2017-01-04T17:22:13.311693Z", "start": "2017-01-04T16:22:13.311693Z"}, {"end": "2017-01-04T17:22:13.311693Z", "start": "2017-01-04T16:22:13.311693Z"}}
and it works like a list of object storing a start time and an end time. Now i want to query all matches that are not past. How can i do that? Is it possible to compare a single "start" value with the current data?
CREATE TABLE
statement showing data types & constraints; what you have so far (even if it's not working); desired example result. – Erwin Brandstetter'[{"end": "...", "start": "..."}, {...}]'
? – Erwin BrandstetterERROR: invalid input syntax for type json
– Erwin Brandstetter