Re: Client-requested cast mode to emulate Pg8.2 on v8.3

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Martin Langhoff <martin(at)catalyst(dot)net(dot)nz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org, moodledev(at)catalyst(dot)net(dot)nz
Subject: Re: Client-requested cast mode to emulate Pg8.2 on v8.3
Date: 2007-11-14 10:36:16
Message-ID: 20071114103616.GA7989@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joao Miguel Ferreira 2007-11-14 11:28:46 autovacuum and reindex
Previous Message hubert depesz lubaczewski 2007-11-14 09:59:27 Re: Using generate_series to create a unique ID in a query?