X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 13ABD4762E0 for ; Wed, 23 Apr 2003 14:32:01 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id EA967474E42 for ; Wed, 23 Apr 2003 14:31:59 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 4AEC9D615; Wed, 23 Apr 2003 11:32:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 409B15C0A; Wed, 23 Apr 2003 11:32:00 -0700 (PDT) Date: Wed, 23 Apr 2003 11:32:00 -0700 (PDT) From: Stephan Szabo To: John Smith Cc: Subject: Re: upgrade problems In-Reply-To: <20030422000243.84605.qmail@web20804.mail.yahoo.com> Message-ID: <20030423113004.O86759-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-16.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/314 X-Sequence-Number: 8469 On Mon, 21 Apr 2003, John Smith wrote: > I'm trying to use 7.22 , coming from 7.1 but I get the > error on 7.3 as well. My problems is with dates > though. I get this error when trying to do a query > that worked on 7.1 > > The query : SELECT id, occurs, > to_char(timestamp('now',starttime),'HH12:MI PM') as > starttime, to_char(timestamp('now',endtime),'HH12:MI > PM') as endtime, location FROM site_interview_sessions > WHERE job_id = 730 AND timezone = timezones.id AND > occurs >= 'now' ORDER BY occurs, > to_char(timestamp('now',starttime),'HH24:MI'), > to_char(timestamp('now',endtime),'HH24:MI'), generated > this error ERROR: parser: parse error at or near > \"\'\" ! > I tried changing a few things around, but got no good > results. Is there something with any of these > functions I've used improperly that may be causeing > this query to malfunction? Thanks in advance. My guess is the use of the timestamp function. You'll need to use "timestamp"('now', ...) to call the function (Rather than it being the type with an precision specification). However, what are you actually trying to get from those calls in any case?