On Fri, 29 Jan 2010 15:45:48 -0000, "Greg Sabino Mullane"
<[email protected]> wrote:
> >> The fact that count(*) shows up as "count" in the field name isn't driven
> >> by
> >> DBI - it's driver dependent.
> >>
> >
> >
> > DBD::Pg - "count"
> >
> > DBD::Oracle - "count(*)"
> >
> > DBD::Unify - "count(*)"
> >
> > DBD::CSV - "count(*)"
> >
> > DBD::SQLite - "count(*)"
> >
> >
> >
> > So IMHO a bug in DBD::Pg.
>
> Not so fast there. :) First, DBD::Pg is getting the column name from Postgres.
That is what Erik also explained to me. I was being overly hopeful :)
> Second, it may well be that Postgres is doing it *correct* and the other
> are wrong. Certainly not echoing a function's arguments as part of the column
> name seems a reasonable thing to do to me, legal or not.
Nah :)
> postgres=# select length('abcdef');
> length
> --------
> 6
>
> mysql> select length('abcdef');
> +------------------+
> | length('abcdef') |
> +------------------+
> | 6 |
> +------------------+
>
> Well, at least they agree on the "6" :)
I'll come up with some docs for DBI.
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/