Re: quote_literal(integer) does not exist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: "Andreas 'ads' Scherbaum" <adsmail(at)wars-nicht(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: quote_literal(integer) does not exist
Date: 2007-11-25 18:23:34
Message-ID: 18605.1196015014@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> So, I wonder why we don't just adapt the internal function to take
> anyelement?

The main argument against is the "slippery slope" one: once we accept
this, what else? The entire point of that change was to make people
be aware of where they are inducing text coercions, and deciding to
hide that again on the basis of individual complaints is no way to
design a system.

As a not-too-far-away example, I see that the proposed patch Pavel
sent in arbitrarily decides to change quote_ident() too, which was
not asked for and has got much less justification than changing
quote_literal(). That sort of cowboy approach to semantics is not
the way to proceed.

Another issue is that changing pg_proc.h without forcing initdb
is not good practice. We are far enough along in the beta cycle
that we shouldn't force initdb lightly, and I definitely *don't*
want to do it again next week when someone else comes up with
some other "must have" auto-coercing function. If anyone wants
to make a serious argument for this, look through the whole of
pg_proc.h, see what else needs to be changed at the same time,
and make a coherent proposal.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2007-11-25 18:30:52 Re: 8.3devel slower than 8.2 under read-only load
Previous Message Tom Lane 2007-11-25 17:53:17 Re: [COMMITTERS] pgsql: Add regression tests for MONEY type.