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

From: Martin Langhoff <martin(at)catalyst(dot)net(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Cc: moodledev(at)catalyst(dot)net(dot)nz
Subject: Client-requested cast mode to emulate Pg8.2 on v8.3
Date: 2007-11-14 04:31:48
Message-ID: 473A7A34.4000602@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all -

I've spotted the cast-related "regressions" being discussed here
http://archives.postgresql.org/pgsql-general/2007-11/msg00505.php

... as a Moodle developer supporting Pg, the stricter cast rules in pg
8.3 are somewhat worrying. Is there a straightforward way to configure a
given DB or a client connection to emulate Pg v8.2.x casting rules?

I say they are worrying because Moodle code has many ocurrences of

/* bla.id is an INT8 */
SELECT x,y,z FROM bla WHERE id='1';

And we also often quote INT values for inserts/updates, I am not sure if
this is supported either.

This is quite widespread in the codebase -- for histerical raisins that
will be familiar to anyone involved in LAMP projects -- and unlikely to
change quickly.

For the record, I generally agree that the stricter rules are good... as
long as there's fallback to the old lazy-fuzzy-ambiguous mode to help
large projects make the transition ;-)

cheers,

martin
PS: I'm not actually in the list - CCs welcome...

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Willem Buitendyk 2007-11-14 04:50:36 Bulk Load Ignore/Skip Feature
Previous Message Merlin Moncure 2007-11-14 03:54:07 Re: Path to top of tree