Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0ALU-0004It-R0 for pgsql-odbc@arkaria.postgresql.org; Fri, 19 Jul 2013 13:03:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V0ALU-0001Su-9v for pgsql-odbc@arkaria.postgresql.org; Fri, 19 Jul 2013 13:03:40 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0ALT-0001Sj-BC; Fri, 19 Jul 2013 13:03:39 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V0ALM-0003Ei-6X; Fri, 19 Jul 2013 13:03:38 +0000 Received: from intern.anarazel.de (p54AF408E.dip0.t-ipconnect.de [84.175.64.142]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id E11B04F0001; Fri, 19 Jul 2013 15:03:30 +0200 (CEST) Date: Fri, 19 Jul 2013 15:03:30 +0200 From: Andres Freund To: "Inoue, Hiroshi" Cc: Robert Haas , Tom Lane , pgsql-hackers@postgresql.org, pgsql-odbc@postgresql.org Subject: Re: [HACKERS] getting rid of SnapshotNow Message-ID: <20130719130330.GI20525@alap2.anarazel.de> References: <3461.1374158054@sss.pgh.pa.us> <51E880CD.6060304@tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51E880CD.6060304@tpf.co.jp> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 2013-07-19 08:57:01 +0900, Inoue, Hiroshi wrote: > >>I had the idea they were used for a client-side implementation of WHERE > >>CURRENT OF. Perhaps that's dead code and could be removed entirely? > > > >It's been reported that ODBC still uses them. > > Though PostgreSQL's TID is similar to Orale's ROWID, it is transient > and changed after update operations unfortunately. I implemented > the currtid_xx functions to supplement the difference. For example > > currtid(relname, original tid) > > (hopefully) returns the current tid of the original row when it is > updated. That is only guaranteed to work though when you're in a transaction old enough to prevent removal of the old or intermediate row versions. E.g. BEGIN; INSERT INTO foo...; -- last tid (0, 1) COMMIT; BEGIN; SELECT currtid(foo, '(0, 1')); COMMIT; can basically return no or even an arbitrarily different row. Same with an update... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc