Java/JDBC/PGSQL Mailing List Archiver

From: Tim Perdue <tim_perdue(at)yahoo(dot)com>
To: Peter Garner <peter_garner(at)yahoo(dot)com>, pgsql-sql(at)hub(dot)org
Subject: Java/JDBC/PGSQL Mailing List Archiver
Date: 1999-01-21 20:00:31
Message-ID: 19990121200031.16915.rocketmail@send105.yahoomail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Sounds interesting. As a C++ programmer, you should have no trouble at all with Java.

I highly recommend IBM VisualAge for Java. It checks all syntax and forces you to be correct. And only $100.

I found an NNTP java class, but I don't know if it's any good or not. I guess SUN has a sun.net.nntp package out there too. (I went to Excite and did a search for java nntp)

I'm using JDBC to drop everything into postgres and it's really pretty slick.

My current table structure looks something like this:

fld_mailing_list text, /* use int and join to other table??? */

fld_date Char(14), /* 19990101010101 I'm afraid I don't understand Postgres's implementation of timestamps*/

fld_subject text,
fld_is_followup int, /* for threading purposes */
fld_from text,
fld_body text,

I didn't put in a unique key because I never plan on having to update the message (it's static). This might be a mistake.

Let me clean up what I have tonite and I'll send it your way to play around with tomorrow or saturday. I have attached the nttp.java class that I found and you can take a gander at that.

I'm not a pgsql genius, so you may have good advice on the datestamps, lobs, etc. Your idea of using multiple records with "chunk number" is really interesting. I'm just concerned about the complexity of that (I was trying to slap this together in 1-2 days). My plan at this point is to truncate messages over 8K.

Keep in touch.

Tim

---Peter Garner <peter_garner(at)yahoo(dot)com> wrote:
>
> 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.

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

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

Attachment Content-Type Size
nntp.java text/plain 7.4 KB

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gregory Holston 1999-01-21 22:14:29 Changing a type
Previous Message Peter Garner 1999-01-21 19:36:38 Re: [SQL] Max Length of SQL