pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Czuczy Gergely <phoemix@harmless.hu>
Cc: pgsql-performance@postgresql.org
Subject: Re: PQexecParams and types
Date: Tue, 03 Feb 2004 09:53:13 -0500
Message-ID: <17666.1075819993@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.44.0402030822001.19142-100000@localhost>
References: <Pine.LNX.4.44.0402030822001.19142-100000@localhost>

Czuczy Gergely <phoemix@harmless.hu> 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



view thread (4+ messages)  latest in thread

Message-ID: <17666.1075819993@sss.pgh.pa.us>
Permalink:  ../17666.1075819993@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17666.1075819993@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, phoemix@harmless.hu
  Subject: Re: PQexecParams and types
  In-Reply-To: <17666.1075819993@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox