pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Max Length of SQL
4+ messages / 3 participants
[nested] [flat]

* Max Length of SQL
@ 1999-01-21 06:20 Tim Perdue, The Des Moines City.net <tim@dmcity.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Tim Perdue, The Des Moines City.net @ 1999-01-21 06:20 UTC (permalink / raw)
  To: pgsql-sql@hub.org

I'm started to run into a situation where my SQL statements are too long
(I'm archiving a mailing list into a Postgres table).

What is the max length of a Text field in PostgreSQL? Suggestions for
working around this besides large objects?

Tim




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] Max Length of SQL
@ 1999-01-21 12:47 Tim Perdue, The Des Moines City.net <tim@dmcity.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Tim Perdue, The Des Moines City.net @ 1999-01-21 12:47 UTC (permalink / raw)
  To: Fabrice Scemama <fabrice.scemama@gesnet.net>; pgsql-sql@hub.org

I've written a Java program that runs every so often (by Cron), then grabs
the email, slices and dices it and drops it into PGSQL.

It's pretty cool.

I'm not sure I understand BLOBS - are they indexable (ie fast searches) and
are they stored inside the table?

Is the example you gave appropriate for storing text? (looks like graphics?)

Tim



-----Original Message-----
From: Fabrice Scemama <fabrice.scemama@gesnet.net>
To: Tim Perdue, The Des Moines City.net <tim@dmcity.net>
Date: Thursday, January 21, 1999 6:29 AM
Subject: Re: [SQL] Max Length of SQL


>"Tim Perdue, The Des Moines City.net" wrote:
>>
>> I'm started to run into a situation where my SQL statements are too long
>> (I'm archiving a mailing list into a Postgres table).
>>
>> What is the max length of a Text field in PostgreSQL? Suggestions for
>> working around this besides large objects?
>>
>> Tim
>
>The maximal lenght is 8192 cars.
>You might need BLOBs instead. Here's an example :
>
>     create table image (name text, raster oid);
>       insert into image (name, raster) values ('fichier', \
>          lo_import('/etc/motd'));
>       select lo_export(image.raster, '/tmp/motd') from image \
>          where name = 'fichier';
>
>Hope it helps.
>BTW, using Pg to store Mailing lists emais seems interesting.
>Do you have a daemon that gets the mails, then parse them and
>populate the DB with them ?...
>
>Fabrice
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] Max Length of SQL
@ 1999-01-21 16:08 Tim Perdue <tim_perdue@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tim Perdue @ 1999-01-21 16:08 UTC (permalink / raw)
  To: pierre@desertmoon.com; pgsql-sql@hub.org



I will open-source it and write an article explaining how it works on
my PHPBuilder.com web site.

It needs to be further debugged right now, and I am expanding it so
that it can talk to NNTP servers too (any volunteers????).

--Tim



---pierre@desertmoon.com wrote:
>
> This sounds very cool....any chance of open sourcing it? So that
those of us
> who lack your most incredible skill can make use of it?
> 
> -=pierre
> 
> > 
> > I've written a Java program that runs every so often (by Cron),
then grabs
> > the email, slices and dices it and drops it into PGSQL.
> > 
> > It's pretty cool.
> > 
> > I'm not sure I understand BLOBS - are they indexable (ie fast
searches) and
> > are they stored inside the table?
> > 
> > Is the example you gave appropriate for storing text? (looks like
graphics?)
> > 
> > Tim
> > 
> > 
> > 
> > -----Original Message-----
> > From: Fabrice Scemama <fabrice.scemama@gesnet.net>
> > To: Tim Perdue, The Des Moines City.net <tim@dmcity.net>
> > Date: Thursday, January 21, 1999 6:29 AM
> > Subject: Re: [SQL] Max Length of SQL
> > 
> > 
> > >"Tim Perdue, The Des Moines City.net" wrote:
> > >>
> > >> I'm started to run into a situation where my SQL statements are
too long
> > >> (I'm archiving a mailing list into a Postgres table).
> > >>
> > >> What is the max length of a Text field in PostgreSQL?
Suggestions for
> > >> working around this besides large objects?
> > >>
> > >> Tim
> > >
> > >The maximal lenght is 8192 cars.
> > >You might need BLOBs instead. Here's an example :
> > >
> > >     create table image (name text, raster oid);
> > >       insert into image (name, raster) values ('fichier', \
> > >          lo_import('/etc/motd'));
> > >       select lo_export(image.raster, '/tmp/motd') from image \
> > >          where name = 'fichier';
> > >
> > >Hope it helps.
> > >BTW, using Pg to store Mailing lists emais seems interesting.
> > >Do you have a daemon that gets the mails, then parse them and
> > >populate the DB with them ?...
> > >
> > >Fabrice
> > >
> > 
> > 
> > 
> 
> 

==
______________________________________________________
Directricity.com - Get local!
http://directricity.com/

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] Max Length of SQL
@ 1999-01-21 19:36 Peter Garner <peter_garner@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Garner @ 1999-01-21 19:36 UTC (permalink / raw)
  To: tim@dmcity.net; pierre@desertmoon.com; pgsql-sql@hub.org

Hi Tim,

  I might be interested in 
collaborating as I am presently writing
an offline reader that gets NNTP news
and puts it in postgres. (I have already
done this in C++ but I want to port it
to Java.)  If nothing else, you are
welcome to the C++ code.  Word of 
warning, I have been doing C++ for 11
years but this is my first attempt at
Java! :-)  Another word of warning, :-)
I am an itinerant consultant and I tend
to get called off to work in the middle
of personal projects like this! :-)

Right now my C++ program uses LOBs.  I
think Herouz is right, however.  She
suggested splitting >8K fields into 
multiple text fields.  E.g. you would 
have a table (for nntp news) like :

create table MsgBodies
(
  MsgId        Text  ,
  ChunkNumber  int   ,
  MsgBody      Text  ,

  primary key (MsgId , ChunkNumber)
) ;

The majority of nntp msgs would just
have one entry, but a few would be split
into two or more entries.


---Tim Perdue <tim_perdue@yahoo.com> wrote:
>that it can talk to NNTP servers too 
>(any volunteers????).

==
Peace,
Peter

We are Microsoft of Borg, you will be assimilated!
Resistance is fut... *BZZRRT*
General Protection Fault in MSBorg32.DLL,
Please contact the vendor of this Borg for more information
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~1999-01-21 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-21 06:20 Max Length of SQL Tim Perdue, The Des Moines City.net <tim@dmcity.net>
1999-01-21 12:47 Re: [SQL] Max Length of SQL Tim Perdue, The Des Moines City.net <tim@dmcity.net>
1999-01-21 16:08 Re: [SQL] Max Length of SQL Tim Perdue <tim_perdue@yahoo.com>
1999-01-21 19:36 Re: [SQL] Max Length of SQL Peter Garner <peter_garner@yahoo.com>

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