Query layers are great. PostgreSQL + PostGIS is great. I use them all the time.
PostgreSQL has a shorthand of using a double colon to cast data types.
CAST('100' AS INTEGER)
is the same as
'100'::INTEGERSo what's the problem? Whenever Pro sees "::", it thinks I'm using a query layer parameter. Instead of letting me cast a value as an integer, it just looks for a parameter named "INTEGER" and throws an error when I don't supply one.
The query will still validate and load, but the features won't draw on the map.
I know, I could just rewrite my things to use CAST instead, and will likely do so for the time being. It just seems a bit absurd for Esri to use an existing SQL convention as their "flag" for something else.
I'm not saying take them our or change the "::" to something else. Just give me a way to tell the program that "no, this is *not* a parameter, just read it as the text I wrote"!