From: James Olin Oden <joden@lee.k12.nc.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Adam Haberlach <haberlaa@ricochet.net>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgreSQL.org>
Cc: steve@blast.com
Subject: Re: [INTERFACES] Re: I am facing a difficult problem..
Date: Mon, 29 Mar 1999 11:47:46 -0500
Message-ID: <36FFAEB1.45E06316@lee.k12.nc.us> (raw)
References: <4544.922721489@sss.pgh.pa.us>
Tom Lane wrote:
> Adam Haberlach <haberlaa@ricochet.net> writes:
> > I would like to know if there is a simple solution to this as well,
> > or if it will be addressed in the future.
>
> It'll probably get fixed someday, but the solution is not trivial;
> don't hold your breath. I'd guess that it might happen two or three
> releases from now, say six months to a year away. (This has been
> discussed many times before, so check the pgsql-hackers list archives
> if you want details about the technical issues.)
>
> In the meantime, your options for large text fields are (1) split them
> into multiple database records, or (2) store them in "large objects".
> Both are pretty ugly :-(
>
> regards, tom lane
Of course you can store them in your file system as separate files and store
their filename as a column in a table. This approach eats up inodes pretty
quickly, though, so its not the best solution. I recently thought of another
option; instead of storing them as separate files do the following:
1) Write out a file with a unique name (one that is unique to the table in
which you store the name).
2) Now run "ar" and insert the file into an archive named after the column
in the database:
ar r archive filename
3) Now delete the file from the file system.
When you want to retrieve this file from the archive type:
ar p archive filename
When you want to update just repeat the same process as above.
Normally, "ar" is used to create libraries of object files; the thing is that
is it's "normal" use but it will create an _updatable_ archive of any type of
file (text files being the ones in question now).
Cheers...james
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: joden@lee.k12.nc.us, tgl@sss.pgh.pa.us, haberlaa@ricochet.net, steve@blast.com
Subject: Re: [INTERFACES] Re: I am facing a difficult problem..
In-Reply-To: <36FFAEB1.45E06316@lee.k12.nc.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox