Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id LAA29763 for postgres-dist; Mon, 28 Feb 1994 11:13:23 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199402281913.LAA29763@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from chorizo.CS.Berkeley.EDU (chorizo.CS.Berkeley.EDU [128.32.149.118]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id LAA29754 for <postgres@postgres.Berkeley.EDU>; Mon, 28 Feb 1994 11:13:23 -0800
Received: from localhost (marcel@localhost) by chorizo.CS.Berkeley.EDU (8.6.4/8.6.3) id LAA11136; Mon, 28 Feb 1994 11:13:12 -0800
Date: Mon, 28 Feb 1994 11:12:41 -0800 (PST)
From: Marcel Kornacker <marcel@postgres.Berkeley.EDU>
Subject: Re: Truncation
To: Suresh Srinivasan <suresh@nlm.nih.gov>
cc: postgres@postgres.Berkeley.EDU
In-Reply-To: <9402281405.AA16708@nls2.csb>
Message-ID: <Pine.3.87.9402281141.A11124-0100000@chorizo.CS.Berkeley.EDU>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Mon, 28 Feb 94 11:13:23 -0800
Resent-XMts: smtp

Try 
	retrieve (w.ui) from w in word_class where w.word >= "foo"

On Mon, 28 Feb 1994, Suresh Srinivasan wrote:

> 
> Hello,
> 
> My newbie question should be an easy one to answer.
> Does POSTGRES support trucation, i.e., can I do "foo*"
> (or foo:) and match all index entries prefixed
> by the string "foo"?
> 
> In other words, given:
> 
>   create word_class (word=text, ui=int4) \g
>   define index word_index on word_class using btree (word text_ops) \g
> 
> and appropriate data, can I do:
> 
>   retrieve (w.ui) from w in word_class where w.word = "foo*" \g
> 
> Thanks,
> 
> --Suresh (suresh@nlm.nih.gov)
> 

