X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8C515D1C9B7 for ; Tue, 18 Nov 2003 00:53:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 91875-04 for ; Mon, 17 Nov 2003 20:53:05 -0400 (AST) Received: from candle.pha.pa.us (unknown [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id E3CB7D1B527 for ; Mon, 17 Nov 2003 20:53:00 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id hAI0qpw10716; Mon, 17 Nov 2003 19:52:51 -0500 (EST) From: Bruce Momjian Message-Id: <200311180052.hAI0qpw10716@candle.pha.pa.us> Subject: Re: start of transaction (was: Re: [PERFORM] Help with count(*)) In-Reply-To: <1069064346.20092.27.camel@fuji.krosing.net> To: Hannu Krosing Date: Mon, 17 Nov 2003 19:52:51 -0500 (EST) Cc: Tom Lane , Neil Conway , Will LaShell , Christopher Browne , "pgsql-hackers@postgresql.org" X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/896 X-Sequence-Number: 47184 Hannu Krosing wrote: > Bruce Momjian kirjutas E, 17.11.2003 kell 02:31: > > > Defining now() as the first call seems pretty arbitrary to me. I can't > > think of any time-based interface that has that API. And what if a > > trigger called now() in an earlier query and you didn't even know about > > it. > > That would be OK. The whole point of that previous discussion was to > have now() that returns the same value over the span of the whole > transaction. I think my issue is that there isn't any predictable way for a user to know when the now() time is recorded. By using start of transaction, at least we know for sure the point in time it is showing. > It would be even better to have now() that returns the time current > transaction is COMMITted as this is the time other backend become aware > of it ;) True, but implementing that would be very hard. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073