Re: Can you tell me the time? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Can you tell me the time?
Date
Msg-id 004901c0f806$babe4da0$1001a8c0@archonet.com
Whole thread Raw
In response to Can you tell me the time?  (Juan Manuel Sende <aliban@tiff93.es>)
List pgsql-general
From: "Juan Manuel Sende" <aliban@tiff93.es>

> I'm working on a database with time filed. so I insert data in this way
> hh:mm:ss.sss it's inserted okay but when i try to get a dum of the field i
> only get hh:mm:ss i've traid with libpq C interfrace, with php and of
> course with psql. ¿Any idea?

Looks like you should get fractional seconds out if you put them in. As a
work-around you can use

date_trunc('milliseconds',mytime)

which will do what you want.

Note - pg_dump seems to only dump hh:mm:ss too, which probably moves this
from irritating to a bug. Unless somebody pipes up and says otherwise Juan,
you might want to fill in a bug report on this.

- Richard Huxton


pgsql-general by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: primary/secondary index, difference
Next
From: "Thalis A. Kalfigopoulos"
Date:
Subject: Re: primary/secondary index, difference