On Wed, 16 Nov 2011 19:59:30 +0000, Tim Bunce <tim.bu...@pobox.com>
wrote:

> 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.

Feel free to extend on that comment if you still think it is not enough
sufficient

> > > > +    $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.

http://unify.com/Products/Data_Management/DataServer/default.aspx
http://unify.com/Products/Data_Management/DataServer/DataServer9.1.pdf

http://support.unify.com/Docs/UnifyDocs/products/dataserver/documentation/dsOLmans.pdf
 => Unify dataServer: SQL/A Reference page #17

I must add that all of our customers - and thus my DBD::Unify - is
still at DataServer version 8.x, but 9.x has no length function either

> > > >  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.

No problem. I thought it to be of now harm in this stage.
And I would *STRONGLY* advice anyone to use Unicode with perl below
5.8.4 anyway :) [as a restriction to 'older' perls]. All my 5.8.x do
have define-or build in, so I'm kind of used to that by now :)

> Thanks.
> Tim.

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to