TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:19152] LOAD DATA INFILE



On Fri, Jun 23, 2000 at 03:38:42PM -0500, George Swan wrote:
> > Whatever anyone else tells you about previous steps,...
> >=20
> > When you get to the part about uploading to PostGres remember the SQL:
> >=20
> > LOAD DATA INFILE <filename> INTO <tablename>
> >=20
> > If PostGress doesn't allow LOAD DATA INFILE... then switch and use MySQL.
> 
> Man.  That's a pretty small feature to base your decision on the DB
> you wish to use.  Don't you think you should at least find out what
> type of information will be stored/modified/updated first?  Ask Tim if
> he's actually going to change data or if he's simply trying to display
> it.  We should also be asking whether the data is a normalized
> database or a wide, un-normalized database.
Okay.

BTW, Tim, we really should be asking what type of information will be
stored/modified/updated first, shouldn't we? Are you actually going to
change data or are you simply trying to display it?  Is the data from a
normalized database (???? whaaaa???) or a wide, un-normalized DB?

[chewie: "NOW CUT THAT OUT!!!"]

>         Name
> 
>             COPY -- Copies data between files and tables
> 
>             COPY [ BINARY ] table [ WITH OIDS ]
>             FROM { 'filename' | stdin }
>             [ [USING] DELIMITERS 'delimiter' ]
>             [ WITH NULL AS 'null string' ]
> 
> That's seems about right.  You can access any documentation about
> PostgreSQL from their website at (http://www.postgres.org).  Good luck
> on your website, Tim.

and now that I'm home, from DeBois:

LOAD DATA [LOW_PRIORITY] [LOCAL] INFILE 'file_name'
   [IGNORE | REPLACE]
   INTO TABLE tbl_name
   import_options
   [IGNORE n LINES]
   [(column_list)]
   [(column_list)]

(nest at import_options)
[FIELDS
   [TERMINATED BY 'string']          // default '\t'
   [OPTIONALLY] ENCLOSED BY 'char']  // default ''
   [ESCAPED BY 'char']]              // default '\\'
[LINES TERMINATED BY 'string']        // default '\n'

Just trying to be helpful.  But it's saturday and I really ought to get
going to HAR MAR and maul the books on postgres at Barnes and Noble.
There's just something about books, ya see... fresh printed manuals.... I
just can't keep my hands off 'em ...

Take it light, guys.

gs