pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedIs there a utility to load data?
3+ messages / 3 participants
[nested] [flat]
* Is there a utility to load data?
@ 2002-02-13 19:00 Pam Wampler <Pam_Wampler@taylorwhite.com>
2002-02-13 19:45 ` Re: Is there a utility to load data? Chris Ruprecht <chrup999@yahoo.com>
2002-02-13 20:02 ` Re: Is there a utility to load data? Jeff Self <jself@nngov.com>
0 siblings, 2 replies; 3+ messages in thread
From: Pam Wampler @ 2002-02-13 19:00 UTC (permalink / raw)
To: pgsql-admin
Is there a postgresql utility to load data from a flat file? Similar to
oracle sqlldr?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Is there a utility to load data?
2002-02-13 19:00 Is there a utility to load data? Pam Wampler <Pam_Wampler@taylorwhite.com>
@ 2002-02-13 19:45 ` Chris Ruprecht <chrup999@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Chris Ruprecht @ 2002-02-13 19:45 UTC (permalink / raw)
To: Pam Wampler <Pam_Wampler@taylorwhite.com>; +Cc: pgsql-admin
Pam,
I use the psql 'copy' function like this:
copy <tablename> from '<file name>' delimiters ',';
Best regards,
Chris
At 14:00 -0500 02/13/2002, Pam Wampler wrote:
>Is there a postgresql utility to load data from a flat file? Similar to
>oracle sqlldr?
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html
--
Chris Ruprecht
Network grunt and bit pusher extraordinaíre
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Is there a utility to load data?
2002-02-13 19:00 Is there a utility to load data? Pam Wampler <Pam_Wampler@taylorwhite.com>
@ 2002-02-13 20:02 ` Jeff Self <jself@nngov.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Self @ 2002-02-13 20:02 UTC (permalink / raw)
To: Pam Wampler <Pam_Wampler@taylorwhite.com>; +Cc: pgsql-admin
pg_restore or copy. look in the documentation.
I import data from flat files usually this way:
psql dbname < file
The file contains a line before the data:
COPY "tablename" FROM stdin;
data....
\.
If your delimiter is something other than tab you must specify the
delimiter type this way:
COPY "tablename" FROM stdin USING DELIMITERS '|'; # this is using | as
the delimiter.
On Wed, 2002-02-13 at 14:00, Pam Wampler wrote:
> Is there a postgresql utility to load data from a flat file? Similar to
> oracle sqlldr?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
--
Jeff Self
Information Technology Analyst
Department of Personnel
City of Newport News
2400 Washington Ave.
Newport News, VA 23607
757-926-6930
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-02-13 20:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-13 19:00 Is there a utility to load data? Pam Wampler <Pam_Wampler@taylorwhite.com>
2002-02-13 19:45 ` Chris Ruprecht <chrup999@yahoo.com>
2002-02-13 20:02 ` Jeff Self <jself@nngov.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox