From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-interfaces@postgresql.org
Subject: Re: DBD::Pg returns 1/0 for boolean field ...
Date: Mon, 7 Nov 2005 13:01:15 -0000
Message-ID: <3e14564a674680c2b4cf85a667261cb1@biglumber.com> (raw)
In-Reply-To: <20051107011444.B993@ganymede.hub.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Am I doing something wrong, that DBD::Pg is "converting" it
> to 1's and 0's? Or is this expected?
That's expected: in Perl (and many other languages), both raw 't'
and 'f' are considered "true", so DBD::Pg does some mapping. Very
handy when you are passing things back and forth. You can turn this
behavior off with the pg_bool_tf attribute like this:
$dbh->{pg_bool_tf} = 1;
The default is 0. I'm going to move the explanation for this higher
up on the DBD::Pg docs page.
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200511070758
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFDb1AZvJuQZxSWSsgRAj5VAKDSgrNIeTUAlDNEjs1mfQ7ygqkSewCfdkEv
A8jdzpObzN5D8xA4dYIjmZ8=
=l8T8
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: greg@turnstep.com
Subject: Re: DBD::Pg returns 1/0 for boolean field ...
In-Reply-To: <3e14564a674680c2b4cf85a667261cb1@biglumber.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox