Re: Data comparison SQL in PG 8.2.9 - Mailing list pgsql-general

From Phoenix Kiula
Subject Re: Data comparison SQL in PG 8.2.9
Date
Msg-id e373d31e0901120040o78fac653qca7b40df5b1f9307@mail.gmail.com
Whole thread Raw
In response to Re: Data comparison SQL in PG 8.2.9  (Thomas Markus <t.markus@proventis.net>)
Responses Re: Data comparison SQL in PG 8.2.9
Re: Data comparison SQL in PG 8.2.9
List pgsql-general
2009/1/12 Thomas Markus <t.markus@proventis.net>:
> be sure to use correct data types. I suppose psql uses timestamps so
>
> select id from users where modify_date = '2009-01-08' limit 1;
>
> is converted to
>
> select id from users where modify_date = '2009-01-08 00:00:00'::timestamp
> limit 1;
>
>
> try
>
> select id from users where modify_date::date = '2009-01-08'::date limit 1;




Thanks. But it used to work without this, and more importantly, this
doesn't explain why the ">" queries are so exceedingly slow now! Any
thoughts?

pgsql-general by date:

Previous
From: Thomas Markus
Date:
Subject: Re: Data comparison SQL in PG 8.2.9
Next
From: Thomas Markus
Date:
Subject: Re: Data comparison SQL in PG 8.2.9