Re: Upgrade to Scientific Linux 6.5 x86_64 breaks query

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Upgrade to Scientific Linux 6.5 x86_64 breaks query
Дата
Msg-id 53D00DF5.3030806@hogranch.com
обсуждение исходный текст
Ответ на Re: Upgrade to Scientific Linux 6.5 x86_64 breaks query  (CG <cgg007@yahoo.com>)
Список pgsql-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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: John Neal
Дата:
Сообщение: JBDC LDAP support for connection parameters
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Upgrade to Scientific Linux 6.5 x86_64 breaks query