On Thu, Apr 03, 2003 at 02:32:00PM +0200, H.Merijn Brand wrote:
> On Thu 03 Apr 2003 14:21, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > On Thu, Apr 03, 2003 at 11:02:19AM +0200, H.Merijn Brand wrote:
> > > On Thu 27 Mar 2003 19:13, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > > file: $CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.14.tar.gz
> > > > size: 199667 bytes
> > > > md5: ec364509df5dfd57a4c05e2c410f358f
> > > >
> > > > =head1 Changes in DBD-Oracle 1.14 27th March 2003
> > > >
> > > > NOTE: OCI 7 and Oraperl will not be supported in future releases.
> > > >
> > > > Implemented inserting NULL values into LOB fields using placeholders,
> > > > (sponsored by bayerwald-fenster.de thanks to Bernhard Donaubauer).
> > > > Fixed broken get_info() due to missing GetInfo.pm #2274.
> > > > Fixed compiler warnings/errors thanks to H.Merijn Brand.
> > > > Fixed bind_param with array ref to croak not warn, reported by Steven Roels.
> > > > Fixed "Bad hash" error using $sth->{ParamValues} if there were no
> > > > placeholders.
> > > > Fixed Makefile.PL for more HPUX/Oracle configurations thanks to Lincoln
> > > > Baxter.
> > > > Simplified MacOS X build thanks to Brook Schofield, see README.macosx.
> > > > Updated README.hpux thanks to H.Merijn Brand, Jay Strauss, and Lincoln
> > > > Baxter.
> > > > Updated README and README.utf8 with minor changes thanks to Alexey Mahotkin.
> > >
> > > Can it be that 1.14 (1.13) suddenly returns double quoted table names from
> > > $dbh->tables ()? I don *not* think that this is a good idea, since it will
> > > break a lot of code (mine for example)
> > >
> > > If this is new behaviour (which I did not see in the change list, but I might
> > > just not look good enough), either revert it, or enable a connection option to
> > > disable the quotes again.
> >
> > It's in interaction between both DBD::Oracle and DBI changes:
> >
> > =head1 Changes in DBD-Oracle 1.14 27th March 2003
> >
> > Fixed broken get_info() due to missing GetInfo.pm #2274.
> >
> > =head1 Changes in DBD-Oracle 1.13 14th March 2003
> >
> > Updated table_info and added get_info, foreign_key_info thanks to Steffen
> > Goeldner.
> >
> > =head2 Changes in DBI 1.21, 7th February 2002
> >
> > Changed tables() to use quote_indentifier() if the driver returns a
> > true value for $dbh->get_info(29) # SQL_IDENTIFIER_QUOTE_CHAR
> >
> > =cut
> >
> > I believe that, technically, the names from tables() should be
> > passed through the quote_identifier() method.
> >
> > In what way is it causing problems for you?
>
> Like in the next snippet. I hope there are not many more, but I know there
> will be, because I use this a lot. Why? Because all these scripts have to be
> database independ[ea]nt (Oracle & Unify)
>
> --8<---
> my $dbh = DBDlogon (1);
>
> foreach my $tbl ($dbh->tables (undef, $schema, undef, undef)) {
> # print STDERR " [ $tbl ]\n";
> $tbl =~ s/"//g; # Ahhhrg, since DBD-Oracle-1.14?
> $tbl =~ s/(\..*)/\L$1/;
> $tbl =~ $pat or next;
> $tbl =~ m/^PROLEP\.lla_/ and next;
> $tbl eq "PROBEV.spd" and next; # binary data
> $tbl =~ m/^$schema\./ or next;
> print STDERR " $tbl ... \n";
> { my ($n, $N) = (0, 0);
> my $sts = prepex ("select * from $tbl");
> my @f = @{$sts->{NAME_lc}};
> my %f = map { $_ => 1 } @f;
> my %n = map { $_ => 0 } @f;
> $sts->bind_columns ([EMAIL PROTECTED]@f});
> while ($sts->fetch) {
> -->8---
>
> > I could add an attribute to tables() to force it to skip the quoting.
>
> That would solve my problem instantly, because the connect/logon procedure is
> centralized in a module, so I have to add that attrib only once.
Actually I meant a method attribute for the tables() method, not a
handle attributes, which would be inappropriate here.
As your connect/logon procedure is centralized you could easily use
subclassing to workaround this.
Tim.