There was a task of transferring the site to a new server. Of the problems, incompatibility with PHP5 was expected, which in the end was very quickly resolved, but the site still did not rise. It turned out that they do not work out the simplest queries to the database. Upon closer inspection, it turned out that automatic type conversion does not occur.
In the process of correspondence with Mr.
Samokhvalov, it turned out that the new version does not, by default, have any rules for automatic conversion of types to textual ones.
http://www.postgresql.org/docs/current/static/release-8-3.html
Non-character data types are no longer automatically cast to TEXT (Peter, Tom)
What happened before: 0 turned into '0' and a string comparison (text> text) occurred. Now automatic casting is missing. This is a more correct approach. You need to adapt your application.
')
If you want everything to work as before, you can create an auto-casting rule for int4-> text, float4-> text, etc. using the CREATE CAST command. But we must understand that this will be exactly the comparison of strings, as before.
I created rules for all types necessary in my case, but this, as I understand it, is not a solution, but a temporary measure, which most likely will affect performance. As a result, at the moment, requests are gradually rewritten, the types are forcibly indicated to correspond to the “standards” of version 8.3.
Nikolay (from correspondence):
PS Such questions should be discussed publicly, unless it is a commercial appeal.
Thank you, Nikolay!