Note: I have moved the essence of this question to here having learned some of what is happening but still wanting to understand. (In essence, ISNULL and COALES
What is the equivalent of SQLite's IFNULL() in Postgres? I have to following query (sqlite in Ruby): SELECT ifnull(max(code_id) + 1, 1) FROM configentries W