Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 17735475D91 for ; Tue, 31 Dec 2002 10:11:25 -0500 (EST) Received: from edison.ioppublishing.com (edison.ioppublishing.com [193.128.223.242]) by postgresql.org (Postfix) with SMTP id 0D0ED475AFF for ; Tue, 31 Dec 2002 10:11:24 -0500 (EST) Received: (qmail 18768 invoked from network); 31 Dec 2002 15:11:27 -0000 Received: from unknown (HELO localhost.localdomain) (127.0.0.1) by localhost with SMTP; 31 Dec 2002 15:11:27 -0000 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "Peter Haworth" To: "Henrik Steffen" , Subject: Re: boolean 't' 'f' vs. '1' '0' - perl question Date: Tue, 31 Dec 2002 15:11:27 +0000 Message-Id: X-Mailer: PGM v0.17 References: <018001c2b0d7$712013a0$7100a8c0@henrik> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/1195 X-Sequence-Number: 35110 On Tue, 31 Dec 2002 15:18:08 +0100, Henrik Steffen wrote: > I am just trying to (finally) upgrade from Pg.pm to > DBI (DBD::Pg) ... > > Until today, Pg.pm delivered a 't' or a 'f' for > true or false boolean values. > > Since the upgrade, DBI delivers a '1' or a '0'. > > Question: Does anyone know if there's possibly a > parameter to set to tell DBI to deliver 't' and 'f' > instead of '1' and '0' ? Not in the current version. It looks like it should be easy enough to hack, though. Just remove lines 1360-1362 of dbdimp.c: if (16 == type) { *val = (*val == 'f') ? '0' : '1'; /* bool: translate postgres into perl */ } This will probably mean that tests will fail, but looks harmless enough otherwise. -- Peter Haworth pmh@edison.ioppublishing.com "I don't have to impress you. And as you're an emacs weenie who doesn't even speak Martian Swahili, I would never expect to." -- Tom Christiansen