Fw: questions in query on 7.1 and 7.2 - Mailing list pgsql-general

From Alex Cheung Tin Ka
Subject Fw: questions in query on 7.1 and 7.2
Date
Msg-id 00b101c236aa$dfe40c80$6a44a8c0@alexpc
Whole thread Raw
Responses Re: Fw: questions in query on 7.1 and 7.2
List pgsql-general
I have try it as following

... extract(month from timestamp '"op_str_time"') = 4...

Seems still not work. I am now curious about pgsql's quotion rule. I am not
very clear when to use single and double quotation.

Regards,
Alex


----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone23.bigpanda.com>
To: "Alex Cheung Tin Ka" <tkcheung@vtc.edu.hk>
Cc: <pgsql-general@postgresql.org>
Sent: Monday, July 29, 2002 10:13 AM
Subject: Re: [GENERAL] questions in query on 7.1 and 7.2


>
> On Mon, 29 Jul 2002, Alex Cheung Tin Ka wrote:
>
> > Dear All,
> >     I have a table progress which contain "duration" text,
> > "op_str_time" text, "form_status" integer, "ao_eamil" text and
> > "ao_res_time" timestamp.
> >
> >     I have run the following query successful in pgsql 7.1 but failed in
version 7.2.
> >
> > select duration, op_str_time from progress where form_status = 4 and
> > ao_email = 'abc@vtc.edu.hk' and ao_res_time is not null and
> > extract(month from timestamp(op_str_time)) = 4;
>
> timestamp(n) is now a type specifier.  You can either double
> quote timestamp (which will make it resolve as the call) or
> better yet, use the sql cast syntax.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: True/False Values
Next
From: Bruce Momjian
Date:
Subject: Re: Shell Script help for backup