Search Postgresql Archives

Re: CURRENT_TIMESTAMP vs actual time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2005-04-21 at 10:21, Thomas Hallgren wrote:
> Christopher J. Bottaro wrote:
> > Alvaro Herrera wrote:

> > Ahh, thanks for the tip.  I guess I'll just stick with
> > timeofday()::timestamp...its more concise anyways...
> > 
> 
> Why use timeofday() at all? Why not now(). It will return a timestamptz 
> without casts.

I think you missed the first part of the conversation, which was he
needed a type that updated inside a transaction:

# begin;

# select timeofday()::timestamptz;
 2005-04-21 10:59:58.181834-05
 
# select now();
 2005-04-21 10:59:50.286865-05

# select timeofday()::timestamptz;
 2005-04-21 11:00:04.821057-05

# select now();
 2005-04-21 10:59:50.286865-05
 


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux