Re: BUG #1720: placeholders do not work with timestamp prefix

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1720: placeholders do not work with timestamp prefix
Дата
Msg-id 9443.1119074066@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1720: placeholders do not work with timestamp prefix  ("Wellie Chao" <wchao@yahoo.com>)
Список pgsql-bugs
"Wellie Chao" <wchao@yahoo.com> writes:
> I am using DBI 1.48 and DBD::Pg 1.42 (the programming language is obviously
> Perl) to connect to PostgreSQL 8.0.0. The following statements cause
> problems:

> 2005-06-17 16:21:41 EDT LOG:  statement: select * from reservation_tbl where
> room_id = $1 and (start_dt, end_dt) overlaps (timestamp $2, timestamp $3)
> 2005-06-17 16:21:41 EDT ERROR:  syntax error at or near "$2" at character
> 93

The above is not valid SQL --- the notation "timestamp x" is only legal
when x is a simple string literal.  I think you need to complain to the
DBI or DBD::Pg folk, if their code is generating this query.

            regards, tom lane

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

Предыдущее
От: "Wellie Chao"
Дата:
Сообщение: BUG #1720: placeholders do not work with timestamp prefix
Следующее
От: "Chii-Tung Liu"
Дата:
Сообщение: BUG #1721: mutiple bytes character string comaprison error