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 59517D1B211 for ; Wed, 9 Jun 2004 19:38:21 -0300 (ADT) 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 82443-02 for ; Wed, 9 Jun 2004 22:38:16 +0000 (GMT) Received: from mail.dialmex.net (67.107.77.98.ptr.us.xo.net [67.107.77.98]) by svr1.postgresql.org (Postfix) with ESMTP id 63982D1B18A for ; Wed, 9 Jun 2004 19:38:12 -0300 (ADT) Received: from david.dialmex.net (dmxnocws13.dialmex.net [67.107.77.78]) by mail.dialmex.net (Postfix) with ESMTP id 7B4ECEE993 for ; Wed, 9 Jun 2004 17:38:15 -0500 (CDT) Received: by david.dialmex.net (Postfix, from userid 4001) id A3D5E1461116; Wed, 9 Jun 2004 17:38:14 -0500 (CDT) Subject: Re: Problem with PQexecPrepared From: David Stanaway To: pgsql-interfaces@postgresql.org In-Reply-To: <20040609222114.GI91662@xs4all.nl> References: <1086817452.10544.5.camel@dmxnocws13.dialmex.net> <20040609222114.GI91662@xs4all.nl> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1086820694.10544.14.camel@dmxnocws13.dialmex.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 09 Jun 2004 17:38:14 -0500 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: 200406/23 X-Sequence-Number: 4951 On Wed, 2004-06-09 at 17:21, Jeroen T. Vermeulen wrote: > On Wed, Jun 09, 2004 at 04:44:12PM -0500, David Stanaway wrote: > > > The type I am passing is a char** and it is expecting const char* const* > Not that it would be a problem here, because the array itself is const > and so the function could never write its own pointer into it. I think > it's one of those rare situations where a cast is justified. Thanks for the clarification. I thought it was odd to have to cast to a const in this case. I changed the call like such: res = PQexecPrepared(serverp->connection, serverp->queryps[BILLING_INSERTROUTED]->prephandle, nparm,(const char *const*)parms,NULL,NULL,1); If the prototype had been for const char** I would not have needed to change anything, the API author I guess is being thorough. -- David Stanaway