Re: optimiser problem - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: optimiser problem
Date
Msg-id Pine.BSF.4.21.0105142211120.20498-100000@megazone23.bigpanda.com
Whole thread Raw
In response to optimiser problem  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
On Tue, 15 May 2001, Gavin Sherry wrote:

> Hi all,
> 
> Can't for the life of me figure out the problem here:
> 
> CREATE TABLE "b" (
>         "id" bigint,
>         "string" text
> );
> 
> CREATE  INDEX "b_pkey" on "b" using btree ( "id" "int8_ops" );

Because of a problem with the typing of int constants, you'll need
to explicitly cast your constant into an int8 in order to use the 
index (where id=1::int8).

> So, a select on b as follows:
> 
> SELECT * FROM b WHERE id=1;




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: optimiser problem
Next
From: Tom Lane
Date:
Subject: Re: SCHEMA idea