pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: Dave E Martin XXIII <postgresql-to.dave@dave.to>
Cc: pgsql-bugs@postgresql.org
Subject: Re: index not used for bigint without explicit cast
Date: 27 May 2003 09:56:51 -0400
Message-ID: <1054043810.93507.1.camel@jester> (raw)
In-Reply-To: <3ED2E46C.2060507@dave.to>
References: <3ED2E46C.2060507@dave.to>

> explain analyze select * from connection_data where id=23457;

Quote the number or cast it to int8.

id='23457' or id=cast(23457 as int8)


PostgreSQL has a hard time with mixed datatypes and indexscans at the
moment.

-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (8+ messages)  latest in thread

Message-ID: <1054043810.93507.1.camel@jester>
Permalink:  ../1054043810.93507.1.camel@jester/
Also on:    postgresql.org/message-id/1054043810.93507.1.camel@jester

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: rbt@rbt.ca, postgresql-to.dave@dave.to
  Subject: Re: index not used for bigint without explicit cast
  In-Reply-To: <1054043810.93507.1.camel@jester>

* 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