'current' timestamp bug

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: 'current' timestamp bug
Date: 2001-05-07 20:36:31
Message-ID: 3AF7074F.5576DF7E@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)selectacast(dot)net
Increase signal to noise ratio. http://www.targabot.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fran Fabrizio 2001-05-07 20:37:35 Re: select off of a view going slowly
Previous Message Morten Primdahl 2001-05-07 20:10:35 Re: Problems w. SERIAL