From: | "Warren Massengill" <warrenmassengill(at)hotmail(dot)com> |
---|---|
To: | ron(dot)l(dot)johnson(at)cox(dot)net |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Copy entire file as one field |
Date: | 2002-12-03 19:55:44 |
Message-ID: | F39TyPvXb29dhyCHrmT000129c9@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
RedHat 8 has Python tutorials and docs. All written in Python. Apparently
you have to buy a book to read the RedHat docs. :-(
Actually, it's not quite that bad. I haven't given up on Python but just
haven't had time to work it out yet.
j\Thanks,
Warren
>From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
>To: Warren Massengill <warrenmassengill(at)hotmail(dot)com>
>Subject: Re: [NOVICE] Copy entire file as one field
>Date: 28 Nov 2002 06:01:07 -0600
>
>On Wed, 2002-11-27 at 20:56, Warren Massengill wrote:
> > I'm not really a Perl programmer. I can see how to write a loop and open
>a
> > specific file but don't know how to tell Perl to copy the file into a db
>or
> > how to work through a directory of files of various names. But I'll work
>on
> > it.
> >
> > Thanks,
> > Warren
> >
>
>I don't know perl either! Attached, though, something like what I'd
>try in python, if all of the small text files are all, and by
>themselves, in a single directory, and you are in that directory.
>The only gotcha might be that the INSERT statement might not like
>all those \n characters...
>
> >
> > >From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
> > >To: PgSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
> > >Subject: Re: [NOVICE] Copy entire file as one field
> > >Date: 27 Nov 2002 20:26:45 -0600
> > >
> > >On Wed, 2002-11-27 at 18:40, Warren Massengill wrote:
> > > > How can I copy several hundred small text files into a database,
>each
> > >file
> > > > going into a field called 'message' and becomming one record (with
>or
> > > > without other fields) using psql?
> > >
> > >Don't know about psql, but you could use python or perl (heck, even C!)
> > >to script it pretty easily.
>
>--
>+------------------------------------------------------------+
>| Ron Johnson, Jr. mailto:ron(dot)l(dot)johnson(at)cox(dot)net |
>| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
>| |
>| "they love our milk and honey, but preach about another |
>| way of living" |
>| Merle Haggard, "The Fighting Side Of Me" |
>+------------------------------------------------------------+
><< pgload.warren.py >>
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
From | Date | Subject | |
---|---|---|---|
Next Message | John Sklavounos | 2002-12-03 21:57:06 | Help! Lost functions |
Previous Message | Warren Massengill | 2002-12-03 19:48:52 | Re: Copy entire file as one field |