X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9925B44E953 for ; Mon, 27 Dec 2004 19:54:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27023-08 for ; Mon, 27 Dec 2004 19:54:39 +0000 (GMT) Received: from smtp.lewczuk.com (118.224.149.195.tld.pl [195.149.224.118]) by svr1.postgresql.org (Postfix) with SMTP id B035E44E952 for ; Mon, 27 Dec 2004 19:54:38 +0000 (GMT) Received: (qmail 17882 invoked by uid 700); 27 Dec 2004 19:54:34 -0000 Received: from nat-mo2.aster.pl (HELO ?10.71.11.58?) (marek@lewczuk.com@212.76.39.231) by 118.224.149.195.tld.pl with SMTP; 27 Dec 2004 19:54:34 -0000 Message-ID: <41D06889.9040503@lewczuk.com> Date: Mon, 27 Dec 2004 20:54:49 +0100 From: Marek Lewczuk User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Michael Fuhr Cc: Lista dyskusyjna pgsql-general , Lista dyskusyjna pgsql-sql Subject: Re: Get current trasanction id References: <41CFCD69.6010503@lewczuk.com> <20041227145406.GA73681@winnie.fuhr.org> In-Reply-To: <20041227145406.GA73681@winnie.fuhr.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.074 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200412/1225 X-Sequence-Number: 70837 Michael Fuhr napisaƂ(a): > On Mon, Dec 27, 2004 at 09:52:57AM +0100, Marek Lewczuk wrote: > > >>is there any way to get current transaction id using plpgsql or sql ? > > > A couple of people have posted suggestions but I'll ask a question: > > Why do you want the transaction ID? What problem are you trying > to solve? > Michael, I've already solved the problem - I found somewhere on the web a very simple C function, which returns transaction id. I need transaction id for plperl functions setVar, getVar (using $_SHARED array). Functions can write/read variables which are available either for connection or transaction. Regards, ML