From: Eric McKeown <ericm@palaver.net>
To: Jim Jennis <jhjennis@imation.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Loading Array data from delimited ascii files
Date: Wed, 9 Sep 1998 13:55:43 -0500 (EST)
Message-ID: <Pine.LNX.3.96.980909135338.244B-100000@farout.palaver.net> (raw)
In-Reply-To: <35F68676.6E5D@imation.com>
On Wed, 9 Sep 1998, Jim Jennis wrote:
> Date: Wed, 09 Sep 1998 09:45:26 -0400
> From: Jim Jennis <jhjennis@imation.com>
> To: pgsql-sql@postgreSQL.org
> Subject: [SQL] Loading Array data from delimited ascii files
>
> Hello Fellow Postgres Users!
>
> Sorry..posted this to the general list by mistake!
>
> I am converting a large document database to postgresql. I have modified
> a table to convert a pair of integer fields in the old database
> (notebook_number, copy_number) into a 2 dimensional array which pairs
> one field with the other. After dumping all the data into a flat "|"
> delimited ascii file, I want to bulk load it into my new table.
>
> psql complains that I need to specify array indicies when I try to do a
> copy using the ascii file as input.
>
> What is the proper syntax for storing array points from an ascii file?
Check the syntax for inserting array data into a table. See the docs at:
http://www.postgresql.org/docs/user/arrays.htm
I think all the data that will go into your array field will need to be
contained within one set of delimiters, and you'll need to use the array
insertion syntax to specify your array between the delimiters.
I hope that makes sense/works...
eric
>
> TIA for your help!
> --
> Regards,
>
> Jim Jennis, Senior Specialist/Manufacturing & Information Technology
> Imation Corp.
> Printing & Publishing Systems
> Systems/Networking/Internet Services
> 200 Brucetown Road
> Kearneysville, WV. 25430 USA.
> Internet: jhjennis@imation.com
>
> ------<OpenVMS!--When it Absolutely Positively HAS to Run!>
> ------<Linux!--The Choice of the "GNU" Generation!-------->
> ------<NT?--In Manufacturing translate "Not Today"!-------->
> Disclaimer:
> My opinions belong to me!
> Any similarities between my personal views
> and the corporate views or policies of
> Imation are purely coincidental!
> -----------------------------------------------------------------
>
>
> --
> Regards,
>
> Jim Jennis, Senior Specialist/Manufacturing & Information Technology
> Imation Corp.
> Printing & Publishing Systems
> Systems/Networking/Internet Services
> 200 Brucetown Road
> Kearneysville, WV. 25430 USA.
> Internet: jhjennis@imation.com
>
> ------<OpenVMS!--When it Absolutely Positively HAS to Run!>
> ------<Linux!--The Choice of the "GNU" Generation!-------->
> ------<NT?--In Manufacturing translate "Not Today"!-------->
> Disclaimer:
> My opinions belong to me!
> Any similarities between my personal views
> and the corporate views or policies of
> Imation are purely coincidental!
> -----------------------------------------------------------------
>
>
_______________________
Eric McKeown
ericm@palaver.net
http://www.palaver.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: ericm@palaver.net, jhjennis@imation.com
Subject: Re: [SQL] Loading Array data from delimited ascii files
In-Reply-To: <Pine.LNX.3.96.980909135338.244B-100000@farout.palaver.net>
References: <35F68676.6E5D@imation.com> <Pine.LNX.3.96.980909135338.244B-100000@farout.palaver.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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