dbTalk Databases Forums  

Initializing tables from flat files

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Initializing tables from flat files in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kynn@panix.com
 
Posts: n/a

Default Initializing tables from flat files - 03-01-2004 , 01:58 PM










I have several tables of data represented as newline-delimited records
of tab-delimited fields in flat files.

What is the easiest way (e.g. in psql) to initialize PostgreSQL tables
from these flat files? Is there a way to do this without writing a
bazillion INSERT statements?

Thanks!

kj



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #2  
Old   
Joe
 
Posts: n/a

Default Re: Initializing tables from flat files - 03-02-2004 , 11:35 PM






kynn (AT) panix (DOT) com wrote in message news:<200403011958.i21JwO527887 (AT) panix3 (DOT) panix.com>...
Quote:
I have several tables of data represented as newline-delimited records
of tab-delimited fields in flat files.

What is the easiest way (e.g. in psql) to initialize PostgreSQL tables
from these flat files? Is there a way to do this without writing a
bazillion INSERT statements?

Thanks!

kj


COPY ... FROM ...

http://www.postgresql.org/docs/7.4/s...-populate.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.