Re: quote_literal(integer) does not exist - Mailing list pgsql-hackers

From Tom Lane
Subject Re: quote_literal(integer) does not exist
Date
Msg-id 18605.1196015014@sss.pgh.pa.us
Whole thread Raw
In response to Re: quote_literal(integer) does not exist  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: quote_literal(integer) does not exist  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: quote_literal(integer) does not exist  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-hackers
"Brendan Jurd" <direvus@gmail.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add regression tests for MONEY type.
Next
From: "Guillaume Smet"
Date:
Subject: Re: 8.3devel slower than 8.2 under read-only load