How excited I am about the addition of the TYPE attribute for 'bind_col'
added in DBI 1.41.  The example in the DBI documentation is spendid:

  $sth->bind_col(1, undef, { TYPE => SQL_DATETIME });

(The ToDo file is even more exiting, but still To Do.)

I have tried this using DBD::Oracle and DBD::Pg, without success,
however.  This is what I am trying:

  my $sth = $dbh->prepare('select sysdate my_date from dual');
  my $date;
  $sth->execute;
  $sth->bind_col(1, \$date, { TYPE => DBI::SQL_DATETIME });
  my $record = $sth->fetchrow_hashref('NAME_lc');
  print "bound => $date, key => $record->{my_date}\n";
  $sth->finish;

Or for PosgreSQL, the query would be:

  select current_timestamp as my_date

The output is aggrivatingly not in the SQL_DATETIME format of
'YYYY-MM-DD HH:MM:SS'.

I am using DBI 1.41, DBD::Oracle 1.15, DBD::Pg 1.32 with Perl 5.8.2
on i386 running GNU/Linux (osname=linux, osvers=2.4.22-xfs+ti1211,
archname=i386-linux-thread-multi), though that is hopefully not
important, for this question.

Is there something more I should be doing?  Must the Driver modules be
updated for this functionality to work?  Must I have patience?

-kolibrie

Reply via email to