X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8374A52AAE for ; Tue, 16 Aug 2005 17:24:42 -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 93618-04 for ; Tue, 16 Aug 2005 20:24:38 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by svr1.postgresql.org (Postfix) with ESMTP id 9D96152A81 for ; Tue, 16 Aug 2005 17:24:37 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 8so18088nzo for ; Tue, 16 Aug 2005 13:24:38 -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=kMO6bQIkfZFWYbvy94AfpDfZ8I7Ou+xOVgNIKWAHfGCacG7jv6lgJdP6ik47/A5QssOvA80NbaU+oXKIqvAzoS9jhAgZJ6LxtZFJt9cURP2I5hFvnD84H4w1PvFYM1bLVJj0MKLd/MBb33N2hDMSZL1cO+SiX6paG0Ld863Fb3s= Received: by 10.37.20.70 with SMTP id x70mr2204532nzi; Tue, 16 Aug 2005 13:24:37 -0700 (PDT) Received: by 10.36.24.2 with HTTP; Tue, 16 Aug 2005 13:24:37 -0700 (PDT) Message-ID: <1d219a6f0508161324285f4ee6@mail.gmail.com> Date: Tue, 16 Aug 2005 16:24:37 -0400 From: Chris Hoover To: pgsql-admin@postgresql.org Subject: Is there anyway to create a functional index using to_date? 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.024 required=5 tests=[RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/196 X-Sequence-Number: 18515 I'm running 7.3.4 and we are having problems with our reporting views on our database. One fix I wanted to do was to create a functional index using the to_date function. However, when I do a create index abc on table def(to_date(char_field,'yyyymmdd')), PostgreSQL complains about a parser error at the 'yyyymmdd'. Is there anyway to force PostgreSQL to create this kind of index? I can get it to create on if I create a special function that just takes the field to be converted and returns the converted date.=20 However, I would prefer not to go that route since it requires us to update all of our views. Thanks for any help, Chris