Re: optimiser problem

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: optimiser problem
Date: 2001-05-15 05:12:16
Message-ID: Pine.BSF.4.21.0105142211120.20498-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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;

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-05-15 05:17:34 Re: Postgres bug (working with iserverd)
Previous Message Gavin Sherry 2001-05-15 05:06:36 Re: optimiser problem