"Nigel J. Andrews" wrote:
>
> On Mon, 3 Feb 2003, Mikael Carneholm wrote:
>
> > What's the cause of this behaviour? Why isn't psql (or the backend) converting integer type arguments into
char/stringtypes, if there's this much to gain?
>
> Someone more familiar with the backend can answer this a lot better than I
> could so I won't give a half assed comment.
It is the other way round. The backend converts a non-quoted sequence of
digits too early into an int4 and cannot recover from that "mistake".
A single quoted literal value is treated as a constant of unknown
datatype and get's parsed into what fits best much later.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #