Hi Craig,
Craig O'Shannessy schrieb:
> I'm using EJB CMP (Enterprise Java Beans, Container Managed Persistence),
> so the SQL is generated. I would think this is a common usage of
> PostgreSQL, as a database for a modern EJB container. There are options
> for fixing this (not including fixing postgres itself), IMHO the best is
> patching the JDBC PreparedStatement code so that setLong() adds '::int8'.
> The advantage here is that you can use hand coded prepared statements, as
> well as auto CMP ones, and both will get the proper cast.
>
> The real problem is that PostgreSQL out of the box is not really usable
> for CMP! This really isn't good, and I'm always suprised that it's not
> fixed. It was very luck we found the bug on the website when we were
> evaluating PostgreSQL against Oracle, it wasn't easy to track down or fix,
> and it causes truly horrible performance problems.
>
> I spose you'd call it my pet peeve.
>
I agree with you wholeheartly - it also bothers me why
postgresql can cast [0-9]+ to int4, but only
'[0-9]+' to int8 or int2, I really cannot see the
difference.
Any ideas where we have to look for the place to patch?
Regards
Tino