BTW in Postgresql 8.0 you can do:
ALTER TABLE foo ALTER foo_timestamp TYPE timestamp(0) with timezone;
It'll do the truncation for you.
Regards,
Ben
"Michael Glaesemann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> On Jun 10, 2005, at 11:37 AM, Michael Glaesemann wrote:
>
>
On Jun 11, 2005, at 5:28 AM, David Siebert wrote:
Quick question. can you set timestamptz to no fractional seconds?
The docs are very useful for things like this:
http://www.postgresql.org/docs/7.4/interactive/datatype-datetime.html
-
Name timestamp [ (p) ] times
On Jun 10, 2005, at 11:37 AM, Michael Glaesemann wrote:
A short term solution would be to update the column using something
like update foo set foo_timestamp = date_trunc(foo_timestamp).
Sorry. That isn't clear (or correct!) Complete example at the bottom
of the email.
UPDATE foo
SET fo
On Jun 10, 2005, at 7:07 AM, David Siebert wrote:
When I use now in an update it is giving me a very odd value in the
database. This is what PGAdminIII shows 2005-06-09 13:52:46.259715
I am not expecting the decimal seconds. I am getting an out of
range error in java when I read the column.
Windows XP SP2
Java SDK V1.4.2_08
JDBC 7.4.216.jdbc3
When I use now in an update it is giving me a very odd value in the
database. This is what PGAdminIII shows 2005-06-09 13:52:46.259715
I am not expecting the decimal seconds. I am getting an out of range
error in java when I read the column.