Thread: now() more precise than the transaction
I know this was discussed a while back, and I just reviewed the discussion. It looks like the proposal was to make now('immediate') get the exact current time. But is there a way to get that now? I can't find anything in the FAQs or in the 7.3 docs that indicates any of the functions do anything other than now('transaction'). -- greg
Try CURRENT_TIMESTAMP You should be able to get your time that way -----Original Message----- From: Gregory Stark [mailto:gsstark@mit.edu] Sent: Tuesday, February 04, 2003 2:28 PM To: Postgresql General Mailing List Subject: [GENERAL] now() more precise than the transaction I know this was discussed a while back, and I just reviewed the discussion. It looks like the proposal was to make now('immediate') get the exact current time. But is there a way to get that now? I can't find anything in the FAQs or in the 7.3 docs that indicates any of the functions do anything other than now('transaction'). -- greg ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org
On Tue, Feb 04, 2003 at 14:27:03 -0500, RobertD.Stewart@mail.state.ky.us wrote: > Try CURRENT_TIMESTAMP > You should be able to get your time that way I think he wants timeofday. CURRENT_TIMESTAMP should be the same as now('transaction'), which I think he said wasn't what he wanted. > > -----Original Message----- > From: Gregory Stark [mailto:gsstark@mit.edu] > Sent: Tuesday, February 04, 2003 2:28 PM > To: Postgresql General Mailing List > Subject: [GENERAL] now() more precise than the transaction > > > I know this was discussed a while back, and I just reviewed the discussion. > It > looks like the proposal was to make now('immediate') get the exact current > time. > > But is there a way to get that now? I can't find anything in the FAQs or in > the 7.3 docs that indicates any of the functions do anything other than > now('transaction'). > > -- > greg > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly
Bruno Wolff III <bruno@wolff.to> writes: > On Tue, Feb 04, 2003 at 14:27:03 -0500, > RobertD.Stewart@mail.state.ky.us wrote: > > Try CURRENT_TIMESTAMP > > You should be able to get your time that way The documentation explicitly says now() is just an alias for current_timestamp. I don't know that it's right but I assume so. > I think he wants timeofday. CURRENT_TIMESTAMP should be the same as > now('transaction'), which I think he said wasn't what he wanted. timeofday appears to return text though. Do I just assume it will always cast cleanly to a timestamp? It doesn't seem to be in the same format as timestamps print though. > > -----Original Message----- Btw, no need to quote back the whole original message, I keep outgoing messages. -- greg
On Tue, Feb 04, 2003 at 03:39:13PM -0500, Greg Stark wrote: > timeofday appears to return text though. Do I just assume it will > always cast cleanly to a timestamp? It doesn't seem to be in the > same format as timestamps print though. But it does come out in a format that the timestamp input can accept. It shouldn't be a problem to cast it to timestamp. A ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110