The query is also problematic here, because it returns the full json, and not only the data I selected in the json.
Below, it should return only '_id', and not the whole json stored in event:
test3=> select max(event->>'_id') from events where event is not null;
max
------------------------------------------------
{"_id":"5f93c3a044650105b5074c9a","type":"t2"}
Thanks
raph