Fwd: Extended query protocol and exact types matches.

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: postgres list <pgsql-sql(at)postgresql(dot)org>
Subject: Fwd: Extended query protocol and exact types matches.
Date: 2010-12-09 22:10:10
Message-ID: AANLkTikKz-nTZqo7z4xjNSRDsy-kK7dSnK2m7hGXsHos@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Hey sql@,

---------- Forwarded message ----------
From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
Date: 2010/12/9
Subject: Extended query protocol and exact types matches.
To: pgsql-general(at)postgresql(dot)org

Hey general@,

To be assured and just for calmness.

Problem:

1. CREATE TABLE test_tab (id integer, dat varchar(64));

2. INSERT INTO test_tab VALUES($1, $2) via PQexecParams,
where paramTypes[0] == OID of bigint,
paramTypes[1] == OID of text.

Questions:

Whether this case falls to
http://www.postgresql.org/docs/9.0/static/typeconv-query.html ?

Is such cases safe or it is recommended (best) to specify a
OIDs which are exact matches ?

PS.

I know, that queries like SELECT $1 does not work without
specifying OID or without rewriting it to e.g. SELECT $1::text.

Thanks.

--
// Dmitriy.

--
// Dmitriy.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-12-09 23:12:32 Re: use a variable name for an insert in a trigger for an audit
Previous Message bricklen 2010-12-09 21:24:39 Re: calculation of database size

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-09 22:18:57 Re: Why percent_rank is so slower than rank?
Previous Message David E. Wheeler 2010-12-09 21:43:03 Re: Extensions, patch v16

Browse pgsql-sql by date

  From Date Subject
Next Message Dmitriy Igrishin 2010-12-10 07:53:33 Fwd: Extended query protocol and exact types matches.
Previous Message Tony Capobianco 2010-12-09 21:47:55 sqlplus reporting equivalent in postgres?