On Sunday, December 3, 2023 at 3:32:07 PM UTC Tom Keffer wrote: I'll be merging the V5 branch into the development branch in the next few days, but target the V5 branch for now.
Thanks, I'll target V5 for now. As I recall, the "case sensitivity" problem with Postgres is that in order to achieve case-insensitivity, it converts *everything* to lower case, including column names. When WeeWX starts up, it reads the schema from the database itself. So, something that started out like "outTemp" becomes "outtemp". Then if some code needs the outside temperature to calculate, say, dewpoint, it can't find it because Python string comparisons are always case-sensitive. In the intervening years, perhaps Postgres has added a switch to prevent this. Don't know. To work around it in the WeeWX code would require either that all string comparisons involving SQL types become case-insensitive, which would break countless 3rd party extensions, or the code that reads the schema from the database would have to be changed to read it from metadata, or someplace else. There are ways around the problem. Yeah, like I said to Matthew, I'm planning to put some lookup tables to get around the issue. Hopefully that'll work around the issue. But, it's a biggish project. I'd be mighty grateful if someone took it on. I've been working with databases (PostgreSQL, SQLite, and a few others) for many years. Honestly, I've always stuck to lower-casing all the table names and columns, due to differences in case sensitivity between databases, but when you get a fairly established project that didn't start off that way, especially one like WeeWX that implements its own DB abstraction layer, it's difficult to migrate to a standardized schema. So I understand completely not wanting to mess with the schema. This looks simple enough to set up, thanks to the DB abstraction layer. I've got most of the DB module done, I'm just looking at writing some tests and running WeeWX with the simulator, so that I can catch any places where things might fail. -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/1fe05e39-af4d-4ea4-81bf-091684575c81n%40googlegroups.com.
