Thread: implicit type conversions

implicit type conversions

From
"Coby Beck"
Date:
Hi,

I have a Zope app with a postgres database.  Due to boring technical
details, I am trying to port it from version 7.2.1 to 7.3.2.  This is an
inherited application that is still under active development.

It seems that the older version was doing a lot of type conversions behind
the scenes because bulding the database with the new version results in a
scad of type errors.  For example, many functions declared on (INTEGER) need
to be changed to (BIGINT), type (TEXT) is no longer good enough when it is
actually an integer being passed, things like this.

Is there some kind of global setting or configuration I can modify rather
than patching things all over the place?  I have mixed feelings on these
kinds of behind the scenes "favours" but for now I would just like it to
work...

Thanks,

Coby Beck



Re: implicit type conversions

From
Peter Eisentraut
Date:
Coby Beck writes:

> For example, many functions declared on (INTEGER) need to be changed to
> (BIGINT), type (TEXT) is no longer good enough when it is actually an
> integer being passed, things like this.
>
> Is there some kind of global setting or configuration I can modify rather
> than patching things all over the place?  I have mixed feelings on these
> kinds of behind the scenes "favours" but for now I would just like it to
> work...

If you're desperate, you can read up on the system table pg_cast and
modify the column castcontext for the appropriate casting pairs.

--
Peter Eisentraut   peter_e@gmx.net