Re: timestamp

Поиск
Список
Период
Сортировка
От David Eduardo Gomez Noguera
Тема Re: timestamp
Дата
Msg-id 20011112094528.2e355922.davidgn@servidor.unam.mx
обсуждение исходный текст
Ответ на timestamp  (David Eduardo Gomez Noguera <davidgn@servidor.unam.mx>)
Список pgsql-hackers
long stamp=System.currentTimeMillis(); // Or whatever you use to get yout long.
Timestamp ts = new Timestamp(stamp);

seems like c++ or some other oolanguage code. hide most main things.

i was wondering if the table should have a date field as the field for timestamp, or an integer field
ie  create table p (... timestamp date  ...)
or  create table p (... timestamp integer ...)

or if pgsql interface libraries had a structure (plain c programming here) or a veriable defined for dates from files
(creatintime, modification time, etc...), since it might vary from filesystem to filesystem, or if i did a store from
thetime of the file into the database as an integer into an integer, or turn the time from the file into a string, and
thenstore it  in the database as a date. always with a query, of course.
 
Hope that helps.

Antonio

David Eduardo Gomez Noguera wrote:

> hello.
> i am doing some database, that will have a field indicating the time when that field was last modified, and want to
compareit to a file's modification time.
 
> what is the best way to do it? directly store the timestamp of the file as an integer? or turn the file timestamp
intodate, and then store it as date in the db? or is there a speciall field for that?
 
>
-- 
ICQ: 15605359 Bicho                                 =^..^=
First, they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Gandhi.
........Por que no pensaran los hombres como los animales? Pink Panther........
-------------------------------気検体の一致------------------------------------
暑さ寒さも彼岸まで。
アン アン アン とっても大好き



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Open items
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Open items