Re: Client-requested cast mode to emulate Pg8.2 on v8.3 - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Client-requested cast mode to emulate Pg8.2 on v8.3
Date
Msg-id 20071114103616.GA7989@svana.org
Whole thread Raw
In response to Re: Client-requested cast mode to emulate Pg8.2 on v8.3  (Martin Langhoff <martin@catalyst.net.nz>)
Responses Re: Client-requested cast mode to emulate Pg8.2 on v8.3  ("Anton Melser" <melser.anton@gmail.com>)
List pgsql-general
On Wed, Nov 14, 2007 at 06:56:06PM +1300, Martin Langhoff wrote:
> Hmmm. We'll have to test and see if we have any in Moodle.

All that has happened is that the *implicit* casting is gone. They will
now simply produce errors, the fix being to explicity cast it to the
type you wanted, rather than the system guessing.

The example you gave is not a problem, because unknown != text. It's
only an issue if you're doing things like performing text operations
(substr,like etc) on non-text things (like dates, numbers, etc).

>  - Is there a way to turn it back to the old behaviour with a
>    warning going to the logs?

No.

>  - Is there a way to get v8.2.x to warn on the dubious casts
>    so we can tighten the application side while on v8.2?

Seems to me the easiest way would be to try it out on an 8.3
installation and exercise each query once. There may be a better way
but I don't know it...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

Attachment

pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Using generate_series to create a unique ID in a query?
Next
From: Joao Miguel Ferreira
Date:
Subject: autovacuum and reindex