Is now() atomic?
От | Michael Lush |
---|---|
Тема | Is now() atomic? |
Дата | |
Msg-id | Pine.LNX.4.64.0712131614180.9633@pigeon.ebi.ac.uk обсуждение исходный текст |
Ответы |
Re: Is now() atomic?
|
Список | pgsql-novice |
I'm writing a reporting script (on postgres 8.1) that logs some table stats along with the time, I'd like to write something like this:- SELECT now(), foo, COUNT(*) FROM table GROUP BY foo; now | foo | count --------------------------------+-------+------- 13/12/2007 16:04:49.044687 GMT | A | 21499 13/12/2007 16:04:49.044687 GMT | B | 2517 13/12/2007 16:04:49.044687 GMT | C | 245 . . 13/12/2007 16:04:49.044687 GMT | ZZZ | 23016 Does now() record the time that the SELECT statement was executed or the time that the row is printed out? ie is it possible for the clock to tick during the SELECT resulting in:- now | foo | count --------------------------------+-------+------- 13/12/2007 16:04:49.044687 GMT | A | 21499 . . 13/12/2007 16:04:49.044688 GMT | ZZZ | 23016 -- Michael ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Michael John Lush PhD Tel:44-1223 492626 Bioinformatician HUGO Gene Nomenclature Committee Email: hgnc@genenames.org European Bioinformatics Institute Hinxton, Cambridge URL: http://www.genenames.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
В списке pgsql-novice по дате отправления: