That is neat, and definitely one for the toolbox. It reminded me that back in 2008, I had a similar issue with needing to import CSV data in daily batches into an Oracle database. Oracle has a tool called SQL*Loader which is a sort of Swiss-Army-knife data import tool, and I could run it from a cron job every day to pick up any new files and import them. I’ve just had a quick look to see if similar tools exist for other databases, and it seems that there is one for Postgres called pgloader. https://pgloader.io/