three timestamps/table, use of 'now' in table creation statement
| От | Dennis Gearon | 
|---|---|
| Тема | three timestamps/table, use of 'now' in table creation statement | 
| Дата | |
| Msg-id | 3E267679.6268AA41@cvc.net обсуждение исходный текст | 
| Ответ на | postgres on a PDA ("Al Bean" <albean84@hotmail.com>) | 
| Ответы | Re: three timestamps/table, use of 'now' in table creation statement | 
| Список | pgsql-general | 
I want to have three timestamps columns in a table:
'created'
'modified'
'archived'
not unlike more modern file systems.
What I want to happen is that all three columns get set with the 'now'
value to the nearest second, and they ALL have the exact same value.
I want to be able to compare 'created' with 'modified'
        to see if it's been modified,
I want to be able to compare 'created' with 'archived'
        to see if it's been archived.
I don't want to have NULL's with their propagation issues.
Can I use the constant 'now' in the table creation statements?
Will all three columns get assigned the same value at the start of each
record creation, or will I have some that might straddle a second
boundary and be one second apart?
How do I tell the 'now' constant to be to the second's place in
precision?
--
Carpe Dancem ;-)
-----------------------------------------------------------------
Remember your friends while they are alive
-----------------------------------------------------------------
                         Sincerely, Dennis Gearon
		
	В списке pgsql-general по дате отправления: