Re: [GENERAL] 9k limit?

From: Simon Drabble <simond(at)foxlink(dot)net>
To: Postgres Group <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] 9k limit?
Date: 1999-04-23 01:06:02
Message-ID: Pine.LNX.3.96.990422210226.18339C-100000@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 23 Apr 1999, Chris Bitmead wrote:

> Justin Long wrote:
> >
> > It appears that there is a 9k (8,991) limit on queries ... I have text files
> > that need to go in TEXT fields that are much longer than this. Does anyone
> > have any suggestions as to how to add them to the database? Has anyone else
> > encountered this problem?
>
> Database records may not exceed 8k so increasing the query limit isn't
> going to help you much (although I still think it should be increased).
>
> There arn't many good options. You could use large objects (except that
> their implementation sucks). Or you could break up the object. Something
> like..
> CREATE TABLE textfile (t text);
> CREATE TABLE extrabits (ord int4, textfile oid);
>
> If it fits into 8k you just use the text file class. If it spills over
> you start having to populate the extrabits with an order by field ord.
>
> Then you would SELECT textfile from extrabits order by ord where
> textfile = 'the-oid-of-text-file-you-are-looking-for'; and join them all
> back together
>
> Really ugly I know. I hope these arbitrary limits are removed sometime
> soon.
>
>

Another solution (although not particularly platform-independent) is to
store a path name in the database, and have your app open the file
pointed to thusly, read it, and display/ manipulate it however you want.

This is perhaps even more ugly than Chris's solution :)

You could even store just a file offset, and then you might only need one
text file to store all your text. No forget that. You would have too many
problems updating file offsets to make it worthwhile.

Simon.

--
"The real reason Heisenberg and Schrodinger didn't get along is because,
unknown to many historians, Heisenberg had a dog."

Simon Drabble Somewhere in cyberspace

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Lockhart 1999-04-23 05:21:33 Re: [INTERFACES] where did that date and time come from??
Previous Message Bruce Momjian 1999-04-23 00:49:45 Re: [GENERAL] Offical 6.5 release