Re: why isn't index used?

From: Thomas O'Dowd <tom(at)nooper(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: why isn't index used?
Date: 2002-10-08 00:54:35
Message-ID: 1034038475.20171.134.camel@beast.uwillsee.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn,

> You picked it. The parser reads your number as an int4 and the planner
> assumes that you can't use int4's on an int8 index. It sounds brain-dead. It
> is brain-dead, except that it's also not easy to fix. Putting quotes around
> the number means the planner will treat it as unknown and it works.

Thanks for the reply. It would be great to get this added to the DOCS so
that the next person doesn't spend a day trying to figure it out too.
Also, which is faster: using '3' or 3::int8? I presume shorter is
quicker to parse, but is there an advantage over treating it as an
unknown and an explicit cast?

Tom.
--
Thomas O'Dowd. - Nooping - http://nooper.com
tom(at)nooper(dot)com - Testing - http://nooper.co.jp/labs

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2002-10-08 01:01:08 Re: PLTCL return_null crash...
Previous Message Nigel J. Andrews 2002-10-08 00:36:59 Re: PLTCL return_null crash...