From: John R Pierce <pierce@hogranch.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Upgrade to Scientific Linux 6.5 x86_64 breaks query
Date: Wed, 23 Jul 2014 12:33:09 -0700
Message-ID: <53D00DF5.3030806@hogranch.com> (raw)
In-Reply-To: <1406142837.33674.YahooMailNeo@web162903.mail.bf1.yahoo.com>
References: <1406131842.96108.YahooMailNeo@web162901.mail.bf1.yahoo.com>
<CADK3HHKRFUVJw_zkyP5+1pjTFz6Zmjy1=tjXrvvEEg60pDZvxA@mail.gmail.com>
<1406142837.33674.YahooMailNeo@web162903.mail.bf1.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On 7/23/2014 12:13 PM, CG wrote:
> The parenthesis don't work, but if I explicitly cast that second
> parameter to interval "CAST( $2 AS interval)" I can force it to work.
> That's not ideal.
>
> I don't think it is the lack of an operator. Timestamptz should not be
> comparable directly to an interval, right? That's like saying "2 + 2
> >= Orange" or "today is greater than a minute". I think something is
> eating that first "now() -" so that what is being prepared looks like
> "trans_date between $2 and now()".
>
> The question is what is causing valid SQL, prepared properly on 32bit
> linux to fail to prepare properly on 64bit linux? Based on that log,
> it looks like client-side prepare is falling down.
I think I'd try some experiments with select pg_typeof($1), passing it
your 'interval' value and see what it thinks it is.
test=# select pg_typeof(interval '1 day');
pg_typeof
-----------
interval
(1 row)
test=# select pg_typeof('1 day');
pg_typeof
-----------
unknown
(1 row)
--
john r pierce 37N 122W
somewhere on the middle of the left coast
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: Upgrade to Scientific Linux 6.5 x86_64 breaks query
In-Reply-To: <53D00DF5.3030806@hogranch.com>
References: <1406131842.96108.YahooMailNeo@web162901.mail.bf1.yahoo.com> <CADK3HHKRFUVJw_zkyP5+1pjTFz6Zmjy1=tjXrvvEEg60pDZvxA@mail.gmail.com> <1406142837.33674.YahooMailNeo@web162903.mail.bf1.yahoo.com> <53D00DF5.3030806@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox