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 1C27ED1E33C for ; Mon, 17 Nov 2003 00:09:03 +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 44500-06 for ; Sun, 16 Nov 2003 20:08:34 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id DCDBFD1E33B for ; Sun, 16 Nov 2003 20:08:29 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAH08P19003799; Sun, 16 Nov 2003 19:08:25 -0500 (EST) To: Neil Conway Cc: Will LaShell , Hannu Krosing , Christopher Browne , pgsql-hackers@postgresql.org Subject: Re: start of transaction (was: Re: [PERFORM] Help with count(*)) In-reply-to: <87n0avaonp.fsf@mailbox.samurai.com> References: <200311141251.38786.mallah@trade-india.com> <1068831807.2540.44.camel@fuji.krosing.net> <3FB52FA7.8060508@lashell.net> <4987.1068842326@sss.pgh.pa.us> <87isllbcys.fsf@mailbox.samurai.com> <26338.1068996163@sss.pgh.pa.us> <87n0avaonp.fsf@mailbox.samurai.com> Comments: In-reply-to Neil Conway message dated "Sun, 16 Nov 2003 18:18:02 -0500" Date: Sun, 16 Nov 2003 19:08:24 -0500 Message-ID: <3798.1069027704@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/855 X-Sequence-Number: 47143 Neil Conway writes: > Hmmm... I agree this behavior isn't ideal, although I can see the case > for viewing this as a mistake by the application developer: they are > assuming that they know exactly when transactions begin, which is not > a feature provided by their language interface. Well, actually, it's a bug in the interface IMHO. But as I said in the last thread, it's a fairly widespread bug. We've been taking the position that the interface libraries should get fixed, and that's not happening. It's probably time to look at a server-side fix. > If we do change this, I think Dennis' idea of making now() always > return the same value within a given transaction is interesting: You mean the time of the first now() call? I thought that was an interesting idea also, but it's probably not going to look so hot when we complete the TODO item of adding access to the start-of-current-statement time. Having start-of-transaction be later than start-of-statement isn't gonna fly :-(. If we were willing to abandon that TODO item then I'd be interested in defining now() as Dennis suggested. regards, tom lane