Re: 335 times faster (!) - Mailing list pgsql-general

From Jan Wieck
Subject Re: 335 times faster (!)
Date
Msg-id 3E3EDB19.394B6C79@Yahoo.com
Whole thread Raw
In response to Re: 335 times faster (!)  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
"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 #

pgsql-general by date:

Previous
From: Tilo Schwarz
Date:
Subject: Q: explain on delete
Next
From: Mikael Carneholm
Date:
Subject: Re: 335 times faster (!)