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 18CDAD1B911 for ; Tue, 3 Feb 2004 14:53:23 +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 57543-01 for ; Tue, 3 Feb 2004 10:53:22 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 0749FD1B4B7 for ; Tue, 3 Feb 2004 10:53:19 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i13ErDXx017667; Tue, 3 Feb 2004 09:53:14 -0500 (EST) To: Czuczy Gergely Cc: pgsql-performance@postgresql.org Subject: Re: PQexecParams and types In-reply-to: References: Comments: In-reply-to Czuczy Gergely message dated "Tue, 03 Feb 2004 08:25:38 +0100" Date: Tue, 03 Feb 2004 09:53:13 -0500 Message-ID: <17666.1075819993@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/39 X-Sequence-Number: 5563 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