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

From Andreas 'ads' Scherbaum
Subject quote_literal(integer) does not exist
Date
Msg-id 20071125030546.701e4558@localhost
Whole thread Raw
Responses Re: quote_literal(integer) does not exist
List pgsql-hackers
Hello all,

testing 8.3b3, i found out an interesting thing:

we have some plpgsql functions which use quote_literal() regardless of
the data type. With Beta 3 this does not work anymore[1].

Given the fact, that some functions do a lot of work, you (or at least
we) don't want to look, if the data you just moving around is from type
integer, text or something else. So in the past we just quoted
everything which worked fine.

I can understand, that enforcing a strict type checking is a fine
thing. But given the fact, that PG did a lot of implicit typecasting in
the past, removing this is not a real world solution. This will surely
prevent some more people from upgrading to 8.3 because the previous
fine-working applications will stop working on 8.3.

A quote_literal() which can cope with any data type, maybe combined
with a warning, would be a better way for a smooth upgrade.


Kind regards


1: http://archives.postgresql.org/pgsql-hackers/2007-08/msg00697.php

--             Andreas 'ads' Scherbaum
PostgreSQL User Group Germany


pgsql-hackers by date:

Previous
From: "Gavin M. Roy"
Date:
Subject: Re: 8.3devel slower than 8.2 under read-only load
Next
From: Tom Lane
Date:
Subject: Re: quote_literal(integer) does not exist