Re: [GENERAL] 9k limit? - Mailing list pgsql-general

From Simon Drabble
Subject Re: [GENERAL] 9k limit?
Date
Msg-id Pine.LNX.3.96.990422210226.18339C-100000@localhost
Whole thread Raw
In response to Re: [GENERAL] 9k limit?  (Chris Bitmead <chris.bitmead@bigfoot.com>)
List 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


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Offical 6.5 release
Next
From: dustin sallings
Date:
Subject: Re: [GENERAL] 9k limit?