Don't allow Collections without ids to be written
lossyrob opened this issue · 0 comments
lossyrob commented
Writing an empty Collection is allowed, and will cause a Collection with a NULL id:
postgis=# select pgstac.create_collection('{}');
postgis=# select count(*) from collections where id is null;
count
-------
1
This caused a confusing issue during development due to an accidentally written Collection into a local dev PgSTAC.
It would be useful for PgSTAC to reject the null ID Collections to error loudly about this case.