From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | "Mark J(dot) Bailey" <mjb(at)jobsoft(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Storing an array to Postgresql table |
Date: | 2005-06-19 12:34:33 |
Message-ID: | 20050619123433.GB32482@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, Jun 17, 2005 at 09:04:32 -0500,
"Mark J. Bailey" <mjb(at)jobsoft(dot)com> wrote:
>
> so, what i am looking for essentially is an equiv to "COPY FROM" except
> the "source" is @fields and not a file. and/or some way to the
> fetchrow_array method in perl DBI works (but in reverse where i have the
> array @fields and i simply want to storerow_array (though I realize
> that fetchrow_array is working with a cursor where something like a
> storerow_array is more direct)). Is there anything like "tie" for
> arrays and DBI in perl like you have for the perl "DB_File" module?
>
> i am planning on using DBI and DBD::Pg. Should I consider PgPerl
> instead? Perl is 5.6 on a redhat fedora core 3 server. postgresql is
> 8.0.3. speed is somewhat a concern as I have (at times) several hundred
> thousand "records" from the data source "report" to load and have a
> limited amount of time to process on the server each night.
You can copy from stdin and send the data from your program. I have done
this using Pg (which I think is what you are calling PgPerl). The DBD::Pg
man page mentions being able to do this as well, though I haven't tried it.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2005-06-19 12:48:08 | Re: BIG files |
Previous Message | Bruno Wolff III | 2005-06-19 12:25:45 | Re: allowing ',' (comma) in float8 |