pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: John Smith <pbucherjr@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: upgrade problems
Date: Wed, 23 Apr 2003 11:32:00 -0700 (PDT)
Message-ID: <20030423113004.O86759-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20030422000243.84605.qmail@web20804.mail.yahoo.com>

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?




view thread (3+ messages)

Message-ID: <20030423113004.O86759-100000@megazone23.bigpanda.com>
Permalink:  ../20030423113004.O86759-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030423113004.O86759-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, pbucherjr@yahoo.com
  Subject: Re: upgrade problems
  In-Reply-To: <20030423113004.O86759-100000@megazone23.bigpanda.com>
  References: <20030422000243.84605.qmail@web20804.mail.yahoo.com> <20030423113004.O86759-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox