Skip site navigation (1) Skip section navigation (2)

Re: Copy entire file as one field

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-11-28 02:56:56
Message-ID: F159kQ6mBySsxVY60mJ000009b7@hotmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
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


>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"                |
>+------------------------------------------------------------+
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


pgsql-novice by date

Next:From: Tom LaneDate: 2002-11-28 03:57:08
Subject: Re: DB dump problems
Previous:From: Ron JohnsonDate: 2002-11-28 02:29:51
Subject: Re: DB dump problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group