Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D7D4B1337B2F for ; Thu, 9 Dec 2010 14:24:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 73830-07 for ; Thu, 9 Dec 2010 18:24:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by mail.postgresql.org (Postfix) with ESMTP id EA720133655C for ; Thu, 9 Dec 2010 14:24:23 -0400 (AST) Received: by fxm19 with SMTP id 19so2668777fxm.22 for ; Thu, 09 Dec 2010 10:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=+AuyANKIBIDmFN3Zt4mJY2gmJXXOD1ZgO+hHPagG0rs=; b=dQ0KSm44W1OcJyWZQ7u9Ef3vP0hPwSmZx+WZQWA3pdX6/H9/ATgX6ydhErbkyFUyrB BFjdesmvPyDdlh0YUr+KPDxhmOfPWhSMwFzBvVgAjVNUlePkkSNBKXCtp1EXybCUT/oU lnppdQaQPYPpZaP0vpt4VQWXA7dAjj/HA4pK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=AZupy8BTh1kwK7UtRqFbPLfwUvCv5WW1ZkQOuzPbHsZkRANmtDZ7qZlID9htgbhWbQ gy4SoPw/M+VYbQcwgz2Syx1lSR/D5DwjI4Xo8396OrrW0uISSqVGxVICMTyguyUkEcI1 OT4h4w3qKxwe/aydgF6aWWKQFI4Y0wCrApqCE= MIME-Version: 1.0 Received: by 10.223.123.195 with SMTP id q3mr8666205far.35.1291919061988; Thu, 09 Dec 2010 10:24:21 -0800 (PST) Received: by 10.223.96.141 with HTTP; Thu, 9 Dec 2010 10:24:21 -0800 (PST) Date: Thu, 9 Dec 2010 21:24:21 +0300 Message-ID: Subject: Extended query protocol and exact types matches. From: Dmitriy Igrishin To: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary=001636c5c204c4b5c70496fe58e4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.588 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201012/326 X-Sequence-Number: 170617 --001636c5c204c4b5c70496fe58e4 Content-Type: text/plain; charset=UTF-8 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. --001636c5c204c4b5c70496fe58e4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hey general@,

To be assured and just for calmness.

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

2. INS= ERT INTO test_tab VALUES($1, $2) via PQexecParams,
=C2=A0where paramType= s[0] =3D=3D OID of bigint,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 paramTypes[1] = =3D=3D OID of text.

Questions:

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

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

PS.

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

Thanks.

--
// Dmitriy.


--001636c5c204c4b5c70496fe58e4--