X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 696EF9DC9B8 for ; Tue, 7 Feb 2006 20:17:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80857-10 for ; Tue, 7 Feb 2006 20:17:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mica.fhcrc.org (MICA.FHCRC.ORG [140.107.152.12]) by postgresql.org (Postfix) with ESMTP id DEA669DC999 for ; Tue, 7 Feb 2006 20:16:57 -0400 (AST) Received: from jade.fhcrc.org (JADE.FHCRC.ORG [140.107.42.223]) by mica.fhcrc.org (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id k180Gtqq030939 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 7 Feb 2006 16:17:00 -0800 Received: from [140.107.157.114] (DHCP157114.FHCRC.ORG [140.107.157.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jade.fhcrc.org (Postfix) with ESMTP id A57D5E55C; Tue, 7 Feb 2006 17:16:55 -0800 (PST) Message-ID: <43E93867.2050805@bellew.net> Date: Tue, 07 Feb 2006 16:16:39 -0800 From: Matthew Bellew User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: pgsql-jdbc@postgresql.org Subject: Re: Inconsistent casting with literal vs parameter References: <43E91EFA.4080106@bellew.net> <43E9265E.3070209@bellew.net> <43E9344C.2060805@bellew.net> In-Reply-To: Content-Type: multipart/alternative; boundary="------------030206050208040606050502" X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.2.0.0, Antispam-Data: 2006.02.07.144605 X-FHCRC-SCANNED: Tue Feb 7 16:17:00 2006 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.152 required=5 tests=[AWL=0.151, HTML_MESSAGE=0.001] X-Spam-Score: 0.152 X-Spam-Level: X-Archive-Number: 200602/50 X-Sequence-Number: 14647 This is a multi-part message in MIME format. --------------030206050208040606050502 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Right, I missed that. My last 2 cents on the whole topic. There is a fundamental design issue here with deciding to handle the expression /column < (value/literal/parameter typed or not)/ by converting the column to a string. Obviously, with INSERT INTO the data values must be coerced to the destination column type. In this case, while there is a parsing/optimizing decision to be made, it should be made with a strong bias to convert to the column type (and then handling any tricky coercion failures or optimization issues). Again thanks for your help, Matt Kris Jurka wrote: > > > On Tue, 7 Feb 2006, Matthew Bellew wrote: > >> JDBC Driver Version: PostgreSQL 8.1 JDBC3 with SSL (build 404) >> >> So, does this mean this parameter is not properly respected in the >> driver? >> > > Yes, this parameter is only available in the 8.2 driver. > > Kris Jurka > --------------030206050208040606050502 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: 7bit Right, I missed that.

My last 2 cents on the whole topic.  There is a fundamental design issue here with deciding to handle the expression column < (value/literal/parameter typed or not) by converting the column to a string.  Obviously, with INSERT INTO the data values must be coerced to the destination column type.  In this case, while there is a parsing/optimizing decision to be made, it should be made with a strong bias to convert to the column type (and then handling any tricky coercion failures or optimization issues).

Again thanks for your help,
Matt

Kris Jurka wrote:


On Tue, 7 Feb 2006, Matthew Bellew wrote:

  JDBC Driver Version:      PostgreSQL 8.1 JDBC3 with SSL (build 404)

So, does this mean this parameter is not properly respected in the driver?


Yes, this parameter is only available in the 8.2 driver.

Kris Jurka

--------------030206050208040606050502--