Re: Can you tell me the time?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Can you tell me the time?
Дата
Msg-id 004901c0f806$babe4da0$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на Can you tell me the time?  (Juan Manuel Sende <aliban@tiff93.es>)
Список 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 по дате отправления:

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: primary/secondary index, difference
Следующее
От: "Thalis A. Kalfigopoulos"
Дата:
Сообщение: Re: primary/secondary index, difference