Re: Can you tell me the time?

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Juan Manuel Sende" <aliban(at)tiff93(dot)es>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can you tell me the time?
Date: 2001-06-18 14:55:32
Message-ID: 004901c0f806$babe4da0$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: "Juan Manuel Sende" <aliban(at)tiff93(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-18 15:02:24 Re: Restoring database disk space requirements???
Previous Message Richard Huxton 2001-06-18 14:34:27 Re: primary/secondary index, difference