Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8FDA8475B8E for ; Mon, 23 Sep 2002 16:42:30 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id CE2AC475FF1 for ; Mon, 23 Sep 2002 16:42:27 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g8NKfix19001; Mon, 23 Sep 2002 16:41:44 -0400 (EDT) From: Bruce Momjian Message-Id: <200209232041.g8NKfix19001@candle.pha.pa.us> Subject: Re: [GENERAL] CURRENT_TIMESTAMP In-Reply-To: <200209231336.59105.josh@agliodbs.com> To: josh@agliodbs.com Date: Mon, 23 Sep 2002 16:41:44 -0400 (EDT) Cc: Manfred Koizar , Tom Lane , Aaron Held , Roberto Mello , Neil Conway , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/275 X-Sequence-Number: 9552 Josh Berkus wrote: > I, for one, would judge that the start time of the statement is "during the > execution"; it would only NOT be "during the execution" if it was a value > *before* the start time of the statement. It's a semantic argument. > > The spec is, IMHO, rather vague on how this would relate to transactions. I > do not find it at all inconsitent that Bruce, Thomas, and co. interpreted a > transaction to be an extension of an individual SQL statement for this > purpose (at least, that's what I guess they did). > > Thus, if you accept the postulates that: > 1) "During" a SQL statement includes the start time of the statement, and > 2) A Transaction is the equivalent of a single SQL statement for many > purposes, > Then the current behavior is a logical conclusion. > > Further, we could not change that behaviour without breaking many people's > applications. I don't see how we can defend returning the start of the transaction as the current_timestamp. In a multi-statement transaction, that doesn't seem very current to me. I know there are some advantages to returning the same value for all queries in a transaction, but is that value worth returning such stale time information? -- 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