Re: PQexecParams and types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Czuczy Gergely <phoemix(at)harmless(dot)hu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PQexecParams and types
Date: 2004-02-03 14:53:13
Message-ID: 17666.1075819993@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Czuczy Gergely <phoemix(at)harmless(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Czuczy Gergely 2004-02-03 14:56:06 Re: PQexecParams and types
Previous Message Rigmor Ukuhe 2004-02-03 14:02:00 Re: [PERFORM] MySQL+InnoDB vs. PostgreSQL test?