Strange behaviour in Postgresql

Your update_tbl_point function is probably doing something like this: new.last_update = current_timestamp; but it should be using new.”Last_Update” so fix your trigger function. Column names are normalized to lower case in PostgreSQL (the opposite of what the SQL standard says mind you) but identifiers that are double quoted maintain their case: Quoting an identifier also … Read more

When do Postgres column or table names need quotes and when don’t they?

PostgreSQL converts all names (table name, column names etc) into lowercase if you don’t prevent it by double quoting them in create table “My_Table_ABC” ( “My_Very_Upper_and_Lowercasy_Column” numeric,…). If you have names like this, you must always double quote those names in selects and other references. I would recommend not creating tables like this and also … Read more

Error: Column does not exist

When it comes to Postgresql and entity names (Tables, Columns, etc.) with UPPER CASE letters, you need to “escape” the word by placing it in “”. Please refer to the documentation on this particular subject. So, your example would be written like this: String stm = “DELETE FROM hostdetails WHERE \”MAC\” = ‘kzhdf'”; On a … Read more