Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1065763297D for ; Tue, 25 May 2010 01:31:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34803-05 for ; Tue, 25 May 2010 04:31:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 4B7FF632776 for ; Tue, 25 May 2010 01:31:49 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o4P4Vgrh017419; Tue, 25 May 2010 00:31:42 -0400 (EDT) To: Samuel Stearns cc: "pgsql-admin@postgresql.org" Subject: Re: transaction_timestamp() In-reply-to: <68B59BEDCD36854AADBDF17E91B2937A01A57CCCB9@EXCHMAIL.staff.internode.com.au> References: <68B59BEDCD36854AADBDF17E91B2937A01A57CCCB9@EXCHMAIL.staff.internode.com.au> Comments: In-reply-to Samuel Stearns message dated "Tue, 25 May 2010 13:55:44 +0930" Date: Tue, 25 May 2010 00:31:42 -0400 Message-ID: <17418.1274761902@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/228 X-Sequence-Number: 34701 Samuel Stearns writes: > I have an archiving script running in an 8.3 environment using transaction_timestamp() for the INSERT and DELETE operations. I want to run the same thing in an 8.1 environment but transaction_timestamp() does not exist in 8.1. now() will not work because of the time that elapses between the INSERT and DELETE operations (I will end up losing some data). Does anyone have any suggestions, please? Um ... transaction_timestamp() is exactly the same thing as now(). Perhaps you need to go re-read http://www.postgresql.org/docs/8.3/static/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT regards, tom lane