Re: Importing from CSV, auto creating table?

2019-08-23 Thread Steve Atkins
On 21/08/2019 22:15, stan wrote: I have a situation where we need to import data, as an interim measure, from spreadsheets. I have read up on \copy and COPY, but I do not see that either of these can use the header from a CSV file to define a new table. Am I missing something? Also downloaded

Re: Importing from CSV, auto creating table?

2019-08-22 Thread Reid Thompson
On Thu, 2019-08-22 at 09:01 -0400, Reid Thompson wrote: > On Thu, 2019-08-22 at 08:25 -0400, Reid Thompson wrote: > > On Wed, 2019-08-21 at 17:15 -0400, stan wrote: > > > [EXTERNAL SOURCE] > > > > > > > > > > > > I have a situation where we need to import data, as an interim measure, > > > from

Re: Importing from CSV, auto creating table?

2019-08-22 Thread Reid Thompson
On Thu, 2019-08-22 at 08:25 -0400, Reid Thompson wrote: > On Wed, 2019-08-21 at 17:15 -0400, stan wrote: > > [EXTERNAL SOURCE] > > > > > > > > I have a situation where we need to import data, as an interim measure, > > from spreadsheets. > > > > I have read up on \copy and COPY, but I do not

Re: Importing from CSV, auto creating table?

2019-08-22 Thread Reid Thompson
On Wed, 2019-08-21 at 17:15 -0400, stan wrote: > [EXTERNAL SOURCE] > > > > I have a situation where we need to import data, as an interim measure, > from spreadsheets. > > I have read up on \copy and COPY, but I do not see that either of these can > use the header from a CSV file to define a

Re: Importing from CSV, auto creating table?

2019-08-21 Thread David G. Johnston
On Wednesday, August 21, 2019, Ron wrote: > On 8/21/19 4:15 PM, stan wrote: > >> I have a situation where we need to import data, as an interim measure, >> from spreadsheets. >> >> I have read up on \copy and COPY, but I do not see that either of these >> can >> use the header from a CSV file to

Re: Importing from CSV, auto creating table?

2019-08-21 Thread Ron
On 8/21/19 4:15 PM, stan wrote: I have a situation where we need to import data, as an interim measure, from spreadsheets. I have read up on \copy and COPY, but I do not see that either of these can use the header from a CSV file to define a new table. Am I missing something? Data types. 

Re: Importing from CSV, auto creating table?

2019-08-21 Thread DiasCosta
Hi Stan, I uploaded to the database (PostgreSQL 9.6), monthly and for several years, over 50 000 000 csv records using a version of pgtfutter that I compiled (with some changes if I remember correctly) and the tables were created in loading process from the column titles. Dias Costa On

Re: Importing from CSV, auto creating table?

2019-08-21 Thread David G. Johnston
On Wed, Aug 21, 2019 at 2:15 PM stan wrote: > I have a situation where we need to import data, as an interim measure, > from spreadsheets. > > I have read up on \copy and COPY, but I do not see that either of these can > use the header from a CSV file to define a new table. Am I missing >

Importing from CSV, auto creating table?

2019-08-21 Thread stan
I have a situation where we need to import data, as an interim measure, from spreadsheets. I have read up on \copy and COPY, but I do not see that either of these can use the header from a CSV file to define a new table. Am I missing something? Also downloaded something called pgfutter, which I