Re: [SQL] Text type - Mailing list pgsql-sql

From Gene Selkov Jr.
Subject Re: [SQL] Text type
Date
Msg-id 199901152037.OAA04982@mail.xnet.com
Whole thread Raw
In response to Re: [SQL] Text type  (Frank Barknecht <barknech@ph-cip.uni-koeln.de>)
List pgsql-sql
> I consider changing to a large object type field instead but how can I
> conveniently insert, change and search the text there?

Large objects are nothing but files with a postgres OID. You will save
yourself a lot of hassle by treating your text as files.

You inset a text by creating a file and inserting its name in a table.

You change it by editing or replacing the file.

In order to search your texts, split them up and load into a table one
word per row. This will also allow you to build an index. Numbering
those words in a sequential order will also allow sequences, or
phrases, to be matched. If you need a full text search, refer to
contrib/fulltextindex or search files directly with grep. The latter
will work if the number of files in one directory does not exceed the
maximum number of command line arguments your system supports (which
is about 2000 in most linuxes, but can be ridiculously small in other
systems (e. g., 80 on IRIX).

--Gene

pgsql-sql by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [SQL] Triggers, plpgsql, etc.
Next
From: Stephen Davies
Date:
Subject: Viewing access privileges