X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0ACB7D926C for ; Mon, 7 Nov 2005 01:17:39 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84906-05 for ; Mon, 7 Nov 2005 05:17:37 +0000 (GMT) Received: from hub.org (hub.org [200.46.204.220]) by svr1.postgresql.org (Postfix) with ESMTP id D5B01D8A87 for ; Mon, 7 Nov 2005 01:17:37 -0400 (AST) Received: from localhost (av.hub.org [200.46.204.144]) by hub.org (Postfix) with ESMTP id 93E4526DD91 for ; Mon, 7 Nov 2005 01:17:37 -0400 (AST) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80859-09 for ; Mon, 7 Nov 2005 05:17:36 +0000 (GMT) Received: from ganymede.hub.org (blk-222-82-85.eastlink.ca [24.222.82.85]) by hub.org (Postfix) with ESMTP id 0A50026FC5D for ; Mon, 7 Nov 2005 01:17:35 -0400 (AST) Received: by ganymede.hub.org (Postfix, from userid 1000) id CB4003877D; Mon, 7 Nov 2005 01:17:35 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id C55CC36166 for ; Mon, 7 Nov 2005 01:17:35 -0400 (AST) Date: Mon, 7 Nov 2005 01:17:35 -0400 (AST) From: "Marc G. Fournier" To: pgsql-interfaces@postgresql.org Subject: DBD::Pg returns 1/0 for boolean field ... Message-ID: <20051107011444.B993@ganymede.hub.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.844 required=5 tests=[AWL=0.844] X-Spam-Score: 0.844 X-Spam-Level: X-Archive-Number: 200511/6 X-Sequence-Number: 5802 'k, not sure if I'm overlooking something obvious here, but the query below, when run through psql, returns 't' or 'f', as I'd expect: SELECT vm.path, vm.company_id, vs.ip_address_id, vm.path AS root_path, vm.vm_template_id, vt.mount_union FROM vm_status vs LEFT JOIN virtual_machine vm ON (vs.virtual_machine_id = vm.id) LEFT JOIN vm_template vt ON (vm.vm_template_id = vt.id) WHERE vs.stop_date IS NULL AND vs.server_id IN (SELECT id FROM server WHERE server_name = ? AND status_id = '1' ); But, when I run it DBI/DBD::Pg, I'm getting 1's and 0's ... I'm reading the results as: $get_hosts->execute($hostname); $host_array = $get_hosts->fetchall_arrayref({}); foreach my $row (@$host_array) { and printing the results as: print $row->{'mount_union'} . "\n"; next; Am I doing something wrong, that DBD::Pg is "converting" it to 1's and 0's? Or is this expected? ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664