Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 18D159FB61D for ; Wed, 25 Jul 2007 10:04:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 03161-07 for ; Wed, 25 Jul 2007 10:04:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from relay.icomedias.com (relay.icomedias.com [62.99.232.66]) by postgresql.org (Postfix) with ESMTP id C4C709FB405 for ; Wed, 25 Jul 2007 10:04:53 -0300 (ADT) Received: from loki.local ([10.192.17.128]) by relay.icomedias.com (8.13.7/8.13.7) with ESMTP id l6PD4prj002173 for ; Wed, 25 Jul 2007 15:04:51 +0200 From: Mario Weilguni To: pgsql-performance@postgresql.org Subject: Re: index over timestamp not being used Date: Wed, 25 Jul 2007 15:05:10 +0200 User-Agent: KMail/1.9.7 References: <46A64475.3040201@andromeiberica.com> <46A6537B.6010604@andromeiberica.com> <15140.1185306195@sss.pgh.pa.us> In-Reply-To: <15140.1185306195@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707251505.11182.mweilguni@sime.com> X-Scanned-By: MIMEDefang 2.57 on 10.192.64.104 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/338 X-Sequence-Number: 26022 Am Dienstag 24 Juli 2007 schrieb Tom Lane: > > I thought the > > to_char/to_date/to_timestamp functions were intented for this purposes > > No, they're intended for dealing with wacky formats that the regular > input/output routines can't understand or produce. Really? I use them alot, because of possible problems with different date formats. 20070503 means May 3, 2007 for germans, I don't know what it means to US citizens, but following the strange logic of having the month first (8/13/2005) it might mean March 5, 2007 too. Therefore, using to_timestamp seems to be a safe choice for me, working in any environment regardless of the "date_style" setting.