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 GAA27353 for postgres-dist; Mon, 28 Feb 1994 06:01:13 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199402281401.GAA27353@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 nlm.nih.gov (lhc.nlm.nih.gov [130.14.1.128]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id GAA27344 for <postgres@postgres.berkeley.edu>; Mon, 28 Feb 1994 06:01:11 -0800
Received: from nls2.csb (nls2.nlm.nih.gov) by nlm.nih.gov (4.1/SMI-4.0)
	id AA07477; Mon, 28 Feb 94 09:01:09 EST
Received: by nls2.csb (4.1/SMI-4.1)
	id AA16708; Mon, 28 Feb 94 09:05:17 EST
Date: Mon, 28 Feb 94 09:05:17 EST
From: suresh@nlm.nih.gov (Suresh Srinivasan)
Message-Id: <9402281405.AA16708@nls2.csb>
To: postgres@postgres.Berkeley.EDU
Subject: Truncation
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Mon, 28 Feb 94 06:01:13 -0800
Resent-XMts: smtp


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)
