X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7EA89D1B49B for ; Mon, 22 Mar 2004 17:09:33 +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 91887-08 for ; Mon, 22 Mar 2004 13:09:39 -0400 (AST) Received: from mta3.snet.net (mta3.snet.net [204.60.203.69]) by svr1.postgresql.org (Postfix) with ESMTP id 50E62D1B97B for ; Mon, 22 Mar 2004 13:09:28 -0400 (AST) Received: from kencast.com (167.95.252.64.snet.net [64.252.95.167]) by mta3.snet.net (8.12.3/8.12.3/SNET-smtp-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id i2MH9c8w000610 for ; Mon, 22 Mar 2004 12:09:38 -0500 (EST) Message-ID: <405F1DD7.7060400@kencast.com> Date: Mon, 22 Mar 2004 12:09:43 -0500 From: Wei Weng User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Is this fixed in the 7.4 release? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/21 X-Sequence-Number: 4800 I am having troubles the following code on PostgreSQL 7.3.1. [snip] res = PQexec(conn, "SELECT '' AS blah"); if (!res) { fprintf(stderr, "SELECT command failed: %s\n", PQerrorMessage(conn)); PQclear(res); exit_nicely(conn); } fprintf(stdout, "OID(%d)\n", PQftype(res, 0)); PQclear(res); [/snip] Basically, I am asking the program to return me the field type of the first column in the command "select '' AS blah". I was expecting something like a CHAROID, but the return value is UNKNOWNOID (OID(705)). D'oh. And I also tried "select ' ' AS blah", as well as "select 'A' AS blah", they all returned me UNKNOWNOID (OID(705)) for the first column. Is this a bug? If it is, is it fixed in 7.4 release possibly? -- Wei Weng KenCast Inc.