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

Re: storing a text file

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Mag Gam <magawake(at)gmail(dot)com>
Cc: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: storing a text file
Date: 2010-02-14 19:29:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Sun, Feb 14, 2010 at 09:39:13AM -0500, Mag Gam wrote:
> I would like to index several documents. They are all text files, I
> was wondering what is the best way to do this. I was thinking to have
> a column which will have:
> *docid (serial)
> date (timestamp)
> document (varchar)
> Eventually, I would like to access these documents via a webbrowser
> and I would like to search these documents. Each document is about 10
> to 20kb in size.
> My question is, what datatype would be ideal for "document" field?
> Also, any thoughts and recommendations ?

Make it a TEXT type. You can use PostgreSQL's full text search options for
searching across the set of all documents for given words or phrases.

Joshua Tolley / eggyknap
End Point Corporation

In response to


pgsql-novice by date

Next:From: bill houseDate: 2010-02-14 22:17:51
Subject: Function
Previous:From: LeeDate: 2010-02-14 19:07:06
Subject: Actions requiring commit

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