On Fri 16 Jan 2004 16:26, Tim Bunce <[EMAIL PROTECTED]> wrote:
> On Fri, Jan 16, 2004 at 01:47:19PM +0100, H.Merijn Brand wrote:
> > On Fri 16 Jan 2004 13:05, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > On Fri, Jan 16, 2004 at 12:35:18PM +0100, H.Merijn Brand wrote:
> > > > I don't know if this is DBI or DBD::Oracle's fault, but it is _very_ annoying!
> > > > 
> > > > Given that I have to write perl scripts that work on different type of
> > > > databases, and that we chose to only use lowercase table and field names, and
> > > > given the fact the Oracle is so stupid to return uppercase everywhere, I
> > > > thankfully use the FetchHashKeyName => "NAME_lc" attribute
> > > 
> > > FetchHashKeyName
> > > ^^^^^^^^^ - it only affects fetching hashes (e.g. fetchrow_hashref).
> > 
> > Could that be extended to *every* {NAME} ?
> 
> No. Sorry. Even if I liked the idea all drivers would have to be changed.

DBI or DBD?

> > I've got an awful lot of scripts already that _used_to_ work on `normal'
> > databases, and I somehow hoped that with the introduction of NAME_lc and
> > NAME_uc and FetchHachKeyName NAME would just be aliased to whatever you put
> > there.
> 
> Nope. You might not agree right now but it doesn't seem too hard
> to search and replace {NAME} with {NAME_xx}. Even in a lot of scripts.

Seems like it :(

> > > > my @name = @{$sth->{NAME}};
> > > 
> > > > lep a5:/tmp 119 > perl dbi.pl
> > > > NAME: PARM C_USR WAARDE OMSCHR
> > > > 
> > > > D'uh!!!!!
> > > > 
> > > > Do you understand why I *hate* Oracle?
> > > 
> > > You asked for $sth->{NAME} so you got what Oracle returned.
> > 
> > Which is wrong to start with. I created the table with lower case letters and
> > I want to keep it that way, but that is not your fault. Oracle--
> 
> Oracle is following the international standards. If you want lowercase

Which they, with their arrogant attitude, probably invented themselves and
forced upon the rest of the world

> names you could put double quotes around the names when you create them.
> (Though you'll probably find that causes problems elsewhere.)

I concede ....

> Tim.

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.024 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/

Reply via email to