Skip site navigation (1) Skip section navigation (2)

Re: any way to make query use index?

From: "Chris Hoover" <revoohc(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-admin(at)postgresql(dot)org Admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: any way to make query use index?
Date: 2007-11-15 16:37:49
Message-ID: 1d219a6f0711150837i26f35caek3d80fe4a569f6ebb@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Nov 15, 2007 11:25 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> > Here is the table definition:
> > CREATE TABLE rev_code_desc
> > (
> >   rev_code character(4) NOT NULL,

> If changing the queries seems impractical, you could add an index on
> rev_code::text, or reconsider the choice of column type.
>
>                         regards, tom lane
>

how would you create this index?  create index rev_code_text_idx on
rev_code_desc(rev_code::text) fails complaining "ERROR:  syntax error
at or near "::""

Thanks

Chris

In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2007-11-15 16:49:44
Subject: Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index
Previous:From: Tom LaneDate: 2007-11-15 16:25:24
Subject: Re: any way to make query use index?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group