X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id ECFD8D1D54F for ; Sun, 11 Jan 2004 19:18:37 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 09932-10 for ; Sun, 11 Jan 2004 15:18:08 -0400 (AST) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id A6AD0D1DA7D for ; Sun, 11 Jan 2004 15:17:30 -0400 (AST) Received: (qmail 1207 invoked from network); 11 Jan 2004 19:17:26 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 11 Jan 2004 19:17:26 -0000 From: "Greg Sabino Mullane" To: pgsql-sql@postgresql.org Subject: Re: Different query results in psql and Perl DBI with Postgres 7.2.1 X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: Date: Sun, 11 Jan 2004 19:17:26 -0000 X-Mailer: JoyMail 1.45 Message-ID: <1e889f069f95de5a2abbb10bb4229457@biglumber.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/82 X-Sequence-Number: 16475 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brendan LeFebvre writes: > Even more perplexing: the "0E0" occurs ONLY when setting status to > 'STORE', and not 100% of the time. (though it happens far more often > than not.) It seems to operate in stretches, too: when I am getting > 1-row updates back from the latter query type, it happens several > times in succession. "0E0" is perl's way of saying "0 but true", which means that the statement succeeded, but did not return any rows. If it simply returned a "0", we would not be able to differentiate between an error (false) and no rows affected (0). > Where do I even begin to attempt a diagnosis? It looks as thogh the row you are trying to update does not exist. Not much more advice is possible without seeing a more complete sample of the code. "boyd" writes: > $info =~ s/0//g; # the get_info adds extraneous '0' to the version number It is not extraneous: it is required per the ODBC spec. For a simpler number, try using this: my $pgversion = $dbh->{private_dbdpg}{server_version}; - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200401111401 -----BEGIN PGP SIGNATURE----- iD8DBQFAAaEwvJuQZxSWSsgRAk59AJ4zeNNm225TdecB2wgcQnFIJNqpmgCePmdX XAPC7vVv+517CR2g3p/6U6c= =oSYK -----END PGP SIGNATURE-----