X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DCEA052BBC for ; Sun, 7 Aug 2005 03:10:28 -0300 (ADT) 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 42665-10 for ; Sun, 7 Aug 2005 06:10:17 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by svr1.postgresql.org (Postfix) with ESMTP id 5F16252975 for ; Sun, 7 Aug 2005 03:10:16 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i22so848464wra for ; Sat, 06 Aug 2005 23:10:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=WzmsH5TwMT5DHGW9hLtYfUUJIEHgvD4YNCYx7NZBz6SjnGcoDBsOv9UGcC0TA6/gtpdoQ75GHmIlbRAGDq0bYXH9jDYWv4QJE1GrNGk71AAr9uMCgB25jKWRrMcjXE2wkz6p+PCCRG0XG4KH67hMjMQn7NijL3QSkOXxoxwxsxQ= Received: by 10.54.10.23 with SMTP id 23mr3882307wrj; Sat, 06 Aug 2005 23:10:17 -0700 (PDT) Received: by 10.54.141.14 with HTTP; Sat, 6 Aug 2005 23:10:17 -0700 (PDT) Message-ID: <37ed240d05080623101d1094a1@mail.gmail.com> Date: Sun, 7 Aug 2005 16:10:17 +1000 From: Brendan Jurd To: pgsql-hackers@postgresql.org Subject: gettime() - a timeofday() alternative Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.096 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200508/147 X-Sequence-Number: 71342 Hi all, I propose to add an internal function gettime() that transparently returns the current system time, as a timestamptz with maximum precision. Calling gettime() would be a more elegant approach than calling timeofday() and converting it to a timestamp, and avoids some of the potential problems in that conversion (such as "Sat" being misinterpreted as an Australian timezone). I'm open to alternate suggestions for the name of the function. If there are no objections, I'll start cooking up a patch right away. --=20 BJ