On Thu, 14 Aug 2003, Tim Bunce wrote:
> On Wed, Aug 13, 2003 at 01:33:46PM -0700, Doug Silver wrote:
> > Hi Tim -
> >
> > Upon further RTFM (sigh, should have known better!), the DBD::Pg docs reveal
> > the following:
> > TYPE (array-ref, read-only)
> > Supported by the driver as proposed by DBI, with the restriction,
> > that the types are PostgreSQL specific data-types which do not
> > correspond to international standards.
>
> That's plain wrong. DBD::Pg is broken in that regard.
>
Next version swithes to returning the sql type.
> > I've written a simple subroutine that does inserts and updates based on a
> > hash, so what I did was to query the table in question and get the
> > appropriate types for the fields and adjust the quotes/etc based on the type.
> > I'm not expecting to migrate to a different db anytime soon, so it's not that
> > important to use the ISO/ANSI standards vs Postgresql's values. However I
> > guess it's probably best to completely use the native {pg_type} for now
> > unless you have some advice for an alternative route.
>
> Use the native {pg_type} as {TYPE} will get fixed at some point... I hope.
>
> Are any DBD::Pg developers listening?
>
It will be fixed in 1.31. Though, I just noticied a bug in the code that
does the conversion, I think -- I should know I wrote the code, right :)
We are getting very close to a final release of 1.31. Outstanding bugs are
1. some tests did not get include in the last build.
2. Segfault in bind_param()
3. {TYPE} returning garbage.
So it should not be much longer -- depending on #2.
Rudy