X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BCFD1D1D283 for ; Tue, 3 Feb 2004 14:56:08 +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 56422-07 for ; Tue, 3 Feb 2004 10:56:09 -0400 (AST) Received: from marvin.harmless.hu (marvin.harmless.hu [195.70.51.173]) by svr1.postgresql.org (Postfix) with ESMTP id 687E1D1CCA8 for ; Tue, 3 Feb 2004 10:56:06 -0400 (AST) Received: from marvin.harmless.hu (marvin.harmless.hu [195.70.51.173]) by marvin.harmless.hu (Postfix) with ESMTP id B0FC71000122D; Tue, 3 Feb 2004 15:56:06 +0100 (CET) Date: Tue, 3 Feb 2004 15:56:06 +0100 (CET) From: Czuczy Gergely X-X-Sender: phoemix@localhost To: Tom Lane Cc: pgsql-performance@postgresql.org Subject: Re: PQexecParams and types In-Reply-To: <17666.1075819993@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/40 X-Sequence-Number: 5564 hello to leave it unspecified what value should I set to the paramTypes array? and could you insert this answer to to docs, it could be useful Bye, Gergely Czuczy mailto: phoemix@harmless.hu PGP: http://phoemix.harmless.hu/phoemix.pgp The point is, that geeks are not necessarily the outcasts society often believes they are. The fact is that society isn't cool enough to be included in our activities. On Tue, 3 Feb 2004, Tom Lane wrote: > Czuczy Gergely writes: > > i've read in the docs to use the proper indexes both types must match in > > the where clause, to achive this the user can simply put a string into the > > side of the equation mark and pgsql will convert it automaticly. my > > question is, when I'm using PQexecParams, should I give all the values as > > a string, and it will be converted, or I have to figure out the type of > > the given field somehow? > > You should leave the parameter types unspecified. Their types will be > resolved in much the same way that a quoted literal is handled. > > regards, tom lane >