Re: 335 times faster (!)

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
Cc: Mikael Carneholm <carniz(at)spray(dot)se>, pgsql-general(at)postgresql(dot)org
Subject: Re: 335 times faster (!)
Date: 2003-02-03 21:11:53
Message-ID: 3E3EDB19.394B6C79@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/string types, 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(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mikael Carneholm 2003-02-03 21:27:01 Re: 335 times faster (!)
Previous Message Tilo Schwarz 2003-02-03 21:11:44 Q: explain on delete