'current' timestamp bug - Mailing list pgsql-general

From Joseph Shraibman
Subject 'current' timestamp bug
Date
Msg-id 3AF7074F.5576DF7E@selectacast.net
Whole thread Raw
Responses Re: 'current' timestamp bug  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
It seems some input validation isn't working somewhere.

Unless I'm missing something and somehow 'current' is a magic timestamp
value (in which case the jdbc driver should be able to parse it
somehow).

playpen=# update tablea set ts = current_timestamp where id = 1;
UPDATE 1
playpen=# select * from tablea;
 id |           ts
----+------------------------
  1 | 2001-05-07 16:32:55-04
(1 row)

playpen=# update tablea set ts = 'current_timestamp' where id = 1;
UPDATE 1
playpen=# select * from tablea;
 id |   ts
----+---------
  1 | current
(1 row)

playpen=# update tablea set ts = 'foo' where id = 1;
ERROR:  Bad timestamp external representation 'foo'
playpen=# update tablea set ts = 'current_foo' where id = 1;
UPDATE 1
playpen=# select * from tablea;
 id |   ts
----+---------
  1 | current
(1 row)

playpen=# update tablea set ts = 'xxxxxxxfoo' where id = 1;
ERROR:  Bad timestamp external representation 'xxxxxxxfoo'



--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio.  http://www.targabot.com

pgsql-general by date:

Previous
From: "Mihai Gheorghiu"
Date:
Subject: 7.1-1 installation from RPM
Next
From: Tom Lane
Date:
Subject: Re: v7.1.1 Branched, Packaged and Released ...