X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E49D83A4101 for ; Mon, 8 Nov 2004 23:17:44 +0000 (GMT) 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 73988-07 for ; Mon, 8 Nov 2004 23:17:33 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8336B3A410A for ; Mon, 8 Nov 2004 23:17:35 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id iA8NHVep011699; Mon, 8 Nov 2004 18:17:31 -0500 (EST) To: Doug Homoelle Cc: pgsql-interfaces@postgresql.org Subject: Re: newbie libpq question... In-reply-to: <1099953369.2819.11.camel@ > References: <1099953369.2819.11.camel@ > Comments: In-reply-to Doug Homoelle message dated "Mon, 08 Nov 2004 17:36:09 -0500" Date: Mon, 08 Nov 2004 18:17:31 -0500 Message-ID: <11698.1099955851@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/10 X-Sequence-Number: 5136 Doug Homoelle writes: > res = PQexec(conn, "select blah blah blah"); > test_int=PQntuples(res); > fprintf(stdout,"number of rows: %f\n",test_int); > test_int=PQnfields(res); > fprintf(stdout,"number of cols: %f\n",test_int); If test_int is an integer, you want %d or %i in the format, not %f ... regards, tom lane