Thanks for the info about PostgreSQL. Knowing how often PostgreSQL was mentioned as a point of reference It is more likely the things would probably stay as they are now. Also in the following query Sqlite chooses the column value, not the function result (MySql chooses the Trim result) select trim(txt) as txt from testspaces join (select '' as foo) on txt <> foo Does it match PostgreSQL?