Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 2DFEF1337B53 for ; Fri, 10 Dec 2010 03:53:44 -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 34048-03 for ; Fri, 10 Dec 2010 07:53:37 +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 3BAF11337B49 for ; Fri, 10 Dec 2010 03:53:35 -0400 (AST) Received: by fxm19 with SMTP id 19so3337216fxm.22 for ; Thu, 09 Dec 2010 23:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=6gfuTRyqdJvIlcQvNHwmH/+U0czF8eHsO3SjqLEZQmQ=; b=nHsFpEFBqy8TXUs9em4YtvpaSAvQKwytQm+yOMiU6r32GTGvALmnpZgjIoXkEnvM+h dH6J0tejsbuZ9kLC1MhEhl2Qie97UNC8ZsS3ChRjaJgcmR52bAlMz0RE+Y9dwp4eZdzi RqAu6Yl8uzeZ4xVoICpph+pRgJT8/E0tZVmJ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XcLee+axoZ1sGxhwVC9NQraxO6OXcZkoJdFWkpUegWyvqvuiG7RHXpI5NXN0Ay2Xjc zr9QZvDeQLXuyx2WiXFiu7JodcVoMS/rRa/suWmy507QAtc81/jHrbEgfGgAiVggpgTF kI5THJ3msy2P/AOzsHYgThA30VcWQToxo3Rc8= MIME-Version: 1.0 Received: by 10.223.78.206 with SMTP id m14mr524083fak.73.1291967613709; Thu, 09 Dec 2010 23:53:33 -0800 (PST) Received: by 10.223.96.141 with HTTP; Thu, 9 Dec 2010 23:53:33 -0800 (PST) In-Reply-To: References: Date: Fri, 10 Dec 2010 10:53:33 +0300 Message-ID: Subject: Fwd: Extended query protocol and exact types matches. From: Dmitriy Igrishin To: PostgreSQL Hackers Content-Type: multipart/alternative; boundary=20cf3054a443ad2ca0049709a60c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201012/737 X-Sequence-Number: 175999 --20cf3054a443ad2ca0049709a60c Content-Type: text/plain; charset=UTF-8 ---------- Forwarded message ---------- From: Dmitriy Igrishin Date: 2010/12/10 Subject: Fwd: Extended query protocol and exact types matches. To: postgres list Hey sql@, ---------- Forwarded message ---------- From: Dmitriy Igrishin Date: 2010/12/9 Subject: Extended query protocol and exact types matches. To: pgsql-general@postgresql.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. -- // Dmitriy. --20cf3054a443ad2ca0049709a60c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

---------- Forwarded message ----------<= br>From: Dmitriy Igrishin <dmitigr@gmail.com>
Date: 2010/12/10
Subject: Fwd: Extended query protocol and exact types m= atches.
To: postgres list <pgsql-sql@postgresql.org>


Hey sql@,


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


Hey general@,

To be assu= red 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,
=C2=A0w= here paramTypes[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
= http://www.postgresql.org/docs/9.0/static/typeconv-query.h= tml ?

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.





--
// Dmitriy.





--
// Dmitriy.


--20cf3054a443ad2ca0049709a60c--