An alpha version of a driver for the PostgreSQL database is now available. See the repository
weewx-postgresql. Installation instructions are in the README.
The driver required many changes in the codebase to get rid of any sqlite and MySQL assumptions. Any database-specific information is now in the respective drivers. The net effect is that the extension will only run out of the development branch of the repository.
Unlike SQLite and MySQL, PostgreSQL converts column names to lower-case. Once retrieved from the database, they no longer match the record fields. That is "dateTime ± datetime". I got around this problem by storing the original mixed-case keys as metadata, then retrieving it when the SQL keys were needed. That has a few side effects. In particular, "weectl database drop-columns" no longer works. That's what makes this an alpha version!
The test suites have also not caught up. Indeed, I don't know that they ever will. I haven't figured out an easy way to use the old suites to test an extension.
Many thanks to the Junie code agent in PyCharm. It was fantastic! Saved me days of work.
Have at it and let me know of any problems.
-tk