On Sun, Nov 13, 2011 at 02:07:25PM +0100, H.Merijn Brand wrote: > On Sun, 13 Nov 2011 10:42:34 +0000, Tim Bunce <tim.bu...@pobox.com>, > "H.Merijn Brand" <h.m.br...@xs4all.nl> wrote: > > > On Thu, Nov 10, 2011 at 09:15:43AM -0800, hmbr...@cvs.perl.org wrote: > > > +} elsif ($driver eq 'Unify') { > > > + # Unify does not have varchar > > > + $h->{ChopBlanks} = 1; > > > > Why ChopBlanks? Worth a # comment. > > I thought that the comment "Unify does not have varchar" was clear > enough. Unify only has "char", so when fetching a char(20) field where > only two characters were stored, you'll get it space-padded to 20 back.
Ah, right. I didn't connect the two. > > > + $blob_column_type = 'binary'; > > > + $unicode_column_type = 'char'; # or text > > > + $h->{uni_unicode} = 1; # Available in the upcoming 0.81 > > > + $length_fn = 'undefined'; # I don't think Unify has a function > > > like this > > > > You can't ask Unify for the length of a string? Really? > > I didn't find it in the docs. really Wow. Can you give me a link to the docs? I'm curious. I've never looked at Unify SQL before. > > > sub do_connect { > > > - my ($dsn, $user, $pass, %attr); > > > - if (@ARGV) { > > > - # eg unicode_test.pl > > > "dbi:Pg(AutoCommit=0):host=example.com;port=6000;db=name" user pass > > > - ($dsn, $user, $pass) = @ARGV; > > > - } > > > > Please restore that behaviour. Having people hard-code their own won't > > scale well. > > That behavior is still valid if you call it like that Ah, I missed the + my ($dsn, $user, $pass, %attr) = @ARGV; line in the patch. I'm sorry for my cursory skimming and terse replies. I'm rather distracted at the moment. > > > + $user //= $ENV{DBI_USER} // undef; > > > + $pass //= $ENV{DBI_PASS} // undef; > > > > Please avoid //= etc. The test scripts should be runnable with older perls. > > This script was for analysis only, not for inclusion in the test suite. Sure. I'd like people to be able to run it on older perls though. I'll change it. Thanks. Tim.