David G. Johnston wrote on 08/02/2016
16:05:
I think if I was designing Postgres's type system (or SQL itself?) from scratch, I'd try to make literals look less like strings. I think part of what's unintuitive is that we're so used to thinking of 'Yes' as representing a text value, when Postgres doesn't see it that way. Perhaps if it was "Select text<yes>", and even "Select int<42>" it would be more obvious that "Select <yes>" or "Select <42>" required type inference. But that's just dreaming... Regards, -- Rowan Collins [IMSoP] |