Extended query protocol and exact types matches.

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

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brady Mathis 2010-12-09 18:54:37 Re: Using PG with Windows EFS or TrueCrypt for encryption
Previous Message Reid Thompson 2010-12-09 17:42:25 Re: Tuning Postgres for single user manipulating large amounts of data

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-09 19:48:48 Re: Patch to add a primary key using an existing index
Previous Message Gurjeet Singh 2010-12-09 18:09:44 Re: Patch to add a primary key using an existing index

Browse pgsql-sql by date

  From Date Subject
Next Message Joe Carr 2010-12-09 19:29:42 Correct usage of FOR UPDATE?
Previous Message Edgardo Portal 2010-12-09 16:16:48 Re: concatenate question