ProgrammingError: relation "globalsettings_id_seq" does not exist
LINE 1: select currval('GlobalSettings_id_Seq')
If I do a db()._select(db.GlobalSettings.ALL)...notice the underscore, I get:
SELECT GlobalSettings.settingID, GlobalSettings.settingName, GlobalSettings.settingValue FROM GlobalSettings;
But for PostgreSQL to accept the query, it would have to be:
SELECT "GlobalSettings"."settingID", "GlobalSettings"."settingName", "GlobalSettings"."settingValue" FROM "GlobalSettings";
This is because unless you specifically wrap table and field names with double-quotes, PostgreSQL automatically converts all table and field names to lowercase.
Then web2py cannot do this (yet). You would need to create a view for
your tables with lowercase table names or perhaps there is some
obscure postgresql parameters to make the queries case sensitive
(mysql has it).