On Nov 25, 2007 11:51 PM, Andreas 'ads' Scherbaum <[EMAIL PROTECTED]> wrote:
> But that's not the point: more people will run into this problem and
> this looks like a showstopper for updating to 8.3.
>
> By the way, the function is named quote_literal(), not quote_text().
> From my point of view i expect to get everything correctly quoted,
> what's feeded as input into this function. Given the fact, that
> previous versions accepted every input without notice about the
> implicit cast, i don't see not so much blame in the application.

I had a similar experience to Andreas when I first migrated my app to
8.3b1 for testing.  It wasn't hard to fix, but did seem like an
unnecessary barrier to upgrading.

I agree that the name of the function (and its behavior up till now)
encourage users to think of it as a "quote whatever I throw at you"
function, which is indeed what you would want/expect in the context of
building a dynamic query.

Having quote_literal take its argument as text was fine whilst we were
automatically casting arguments, but in 8.3 it seems that
quote_literal(anyelement) makes a lot more sense than
quote_literal(text).

So, I wonder why we don't just adapt the internal function to take
anyelement?  It would save a lot of apps from being broken by the move
to 8.3, and make the function more convenient.

Regards,
BJ

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to