Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DCB9A63439D for ; Thu, 7 May 2009 05:24:24 -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 68456-08 for ; Thu, 7 May 2009 05:24:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mail.postgresql.org (Postfix) with ESMTP id 830F963221F for ; Thu, 7 May 2009 05:24:23 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so369078yxg.73 for ; Thu, 07 May 2009 01:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=qJ0jU1uzlQGE4bOOhnPc2YDPiUcExixe3QCzmxGb/ik=; b=BPofDKd0RThE7uf/1JtjY2elAMJkegT2bJztDthmia3MLABLKX2suMZZLxZuzYcFHk Jo+VtSm4QbtQUSsYxZbnH8WOemXvm9wScP33Uj17Vu2Ff0q7nHgCk1ehbSaCjypanNEI i/6jMwZpcbcxtIDk+c/XwrwAap5jc+TtvZfT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=k/+lWMx2ZbN3WbkDEeIhGFehFUPd42+OFCTqg1CYb7s3uqBfJXRX+fh/zw3GJrW4++ uXoy66JjA85d+bctCkBzKKaZrYFi0oPWSb7XeB+6k3MdKPNRPMwO+Fmr3Q77wguTBJ42 bFN8j1CJGxLI9uVdrYzZdxSsQwWMEf+G4MOrk= MIME-Version: 1.0 Received: by 10.150.203.13 with SMTP id a13mr4132131ybg.98.1241684662725; Thu, 07 May 2009 01:24:22 -0700 (PDT) Date: Thu, 7 May 2009 15:24:22 +0700 Message-ID: Subject: ask about epoch query with datetime From: haries fajar nugroho To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200905/13 X-Sequence-Number: 32505 Hi All, my institution wants me to migrate from old postgresql to new postgresql, but when i test one of the query it failed at query : select date_part('epoch',datetime('2009-04-20 17:08:01')-datetime('2009-04-20 17:04:24'))::int; that query runs well in previous postgresql (PostgreSQL 7.1.3). The error message is ERROR: function datetime("unknown") does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. If i read the error message, it means the function has changed or something. May I know the latest function so my query can run well in my PostgreSQL 8.1.11 ? Thanks