Tim Bunce wrote:
> 
>
> Does double-quoting work, and provide case sensitivity (as per the standard)?

Let me just check wavelengths here.  Delimited (double quoted)
identifiers *must* be case sensitive and stored in mixed case.  Other
(non-quoted) identifiers *must not* be case sensitive but can also be
stored in mixed case (that's left to the implementation).

So going that route, this is how I have things working in DBD::CSV:

 $dbh->do(q/ CREATE TABLE x ( OOg INT, "BOOg" CHAR ) /);

 $sth=$dbh->prepare(q/ SELECT  oog   FROM x /);  #1 OK
 $sth=$dbh->prepare(q/ SELECT "BOOg" FROM x /);  #2 OK
 $sth=$dbh->prepare(q/ SELECT "boog" FROM x /);  #3 NO SUCH COLUMN
 $sth=$dbh->prepare(q/ SELECT  boog  FROM x /);  #4 NO SUCH COLUMN
 $sth=$dbh->prepare(q/ SELECT  BOOg  FROM x /);  #5 NO SUCH COLUMN

 my $sth=$dbh->prepare("SELECT * FROM x");
 print join ',' @{$sth->{NAME}}            #6  prints OOg,BOOg

 $sth->fetchrow_hashref->{OOg}             # OK
 $sth->fetchrow_hashref->{BOOg}            # OK
 $sth->fetchrow_hashref->{oog}             # NO SUCH HASH KEY
 $sth->fetchrow_hashref->{boog}            # NO SUCH HASH KEY
 $sth->fetchrow_hashref->{q/"BOOg"/}       # NO SUCH HASH KEY

Is that how it should work assuming I want to store in mixed case? (all
this leaving aside aliases).

DBD::Pg differs from the above in that it uses oog and BOOg in the
{NAME} and hashref, otherwise the same.

DBD::ODBC with Access uses OOg and BOOg in the {NAME} and hashref as
above, but permits 3,4,5!

-- 
Jeff

Reply via email to