Skip site navigation (1) Skip section navigation (2)

BUG #1720: placeholders do not work with timestamp prefix

From: "Wellie Chao" <wchao(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1720: placeholders do not work with timestamp prefix
Date: 2005-06-17 20:53:03
Message-ID: 20050617205303.738DBF0B14@svr2.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      1720
Logged by:          Wellie Chao
Email address:      wchao(at)yahoo(dot)com
PostgreSQL version: 8.0.0
Operating system:   Linux (with kernel 2.4.18)
Description:        placeholders do not work with timestamp prefix
Details: 

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
2005-06-17 16:21:41 EDT LOG:  statement: insert into reservation_tbl
(room_id, account_id, start_dt, end_dt, note) values ($1, $2, timestamp $3,
timestamp $4, $5)
2005-06-17 16:21:41 EDT ERROR:  syntax error at or near "$3" at character
101

I think it is something to do with the "timestamp" keyword interacting badly
with placeholders.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-06-18 05:54:26
Subject: Re: BUG #1720: placeholders do not work with timestamp prefix
Previous:From: Kris JurkaDate: 2005-06-17 16:32:27
Subject: plpython regression test leaves /tmp/plpython file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group