Re: boolean 't' 'f' vs. '1' '0' - perl question

From: Michael Teter <mt_pgsql(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: boolean 't' 'f' vs. '1' '0' - perl question
Date: 2002-12-31 16:34:54
Message-ID: 20021231163454.4313.qmail@web14801.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

With each successive release of DBD::Pg, you'll have
to go modify the module again...

Wouldn't it make more sense to modify your code to use
1/0 instead?

MT

--- Henrik Steffen <steffen(at)city-map(dot)de> wrote:
> thanks, this works fine for me ;-)
>
> happy new year,
>
>
> --
>
> Mit freundlichem Gru
>
> Henrik Steffen
> Geschftsfhrer
>
> top concepts Internetmarketing GmbH
> Am Steinkamp 7 - D-21684 Stade - Germany
>
--------------------------------------------------------
> http://www.topconcepts.com Tel. +49 4141
> 991230
> mail: steffen(at)topconcepts(dot)com Fax. +49 4141
> 991233
>
--------------------------------------------------------
> 24h-Support Hotline: +49 1908 34697 (EUR
> 1.86/Min,topc)
>
--------------------------------------------------------
> Ihr SMS-Gateway: JETZT NEU unter:
> http://sms.city-map.de
> System-Partner gesucht:
> http://www.franchise.city-map.de
>
--------------------------------------------------------
> Handelsregister: AG Stade HRB 5811 - UstId: DE
> 213645563
>
--------------------------------------------------------
>
> ----- Original Message -----
> From: "Peter Haworth" <pmh(at)edison(dot)ioppublishing(dot)com>
> To: "Henrik Steffen" <steffen(at)city-map(dot)de>;
> <pgsql-general(at)postgresql(dot)org>
> Sent: Tuesday, December 31, 2002 4:11 PM
> Subject: Re: [GENERAL] boolean 't' 'f' vs. '1' '0' -
> perl question
>
>
> > 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(at)edison(dot)ioppublishing(dot)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
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-12-31 17:14:25 Re: Is postgresql download still working?
Previous Message BuzMavi 2002-12-31 16:13:26 Inquiry From Form [pgsql]