Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7E33E476E24; Fri, 20 Sep 2002 10:38:32 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id B0C30476DC5; Fri, 20 Sep 2002 10:38:30 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 21660D61C; Fri, 20 Sep 2002 07:38:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 170535C03; Fri, 20 Sep 2002 07:38:25 -0700 (PDT) Date: Fri, 20 Sep 2002 07:38:25 -0700 (PDT) From: Stephan Szabo To: Tomas Lehuta Cc: , , Subject: Re: timestamp parse error In-Reply-To: Message-ID: <20020920073512.E40130-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/934 X-Sequence-Number: 30515 On Fri, 20 Sep 2002, Tomas Lehuta wrote: > Hello! > > i'm using PostgreSQL 7.2.1 and got strange parse errors.. > could somebody tell me what's wrong with this timestamp query example? > > PostgreSQL said: ERROR: parser: parse error at or near "date" > Your query: > > select timestamp(date '1998-02-24', time '23:07') > > example is from PostgreSQL help and certainly worked in previous versions of > pgsql.. but in 7.2.1 it does not. had anything changed and not been updated > in pgsql manuals or is it a bug? Presumably it's a manual example that didn't get changed. Timestamp(...) is now a specifier for the type with a given precision. You can use "timestamp"(date '1998-02-24', time '23:07') or datetime math (probably something like date '1998-02-24' + time '23:07' and possibly a cast)