Re: Table column headings PgAmin4

2018-02-07 Thread Anthony DeBarros
Hi, all, My favorite solution to this issue is to use the very handy Python library csvkit: https://csvkit.readthedocs.io/en/1.0.2/ It includes the command line utility csvsql ( https://csvkit.readthedocs.io/en/1.0.2/scripts/csvsql.html), which will read a CSV and generate a CREATE TABLE statemen

Re: Table column headings PgAmin4

2018-02-07 Thread Strauch, Sheldon
Ted and David, Howdy! I too desperately crave this feature in pgAdmin. In light of the fact that there are now three of us interested in this, I have created the feature request in RedMine: https://redmine.postgresql.org/issues/3092 Hopefully, this helps the cause... On Wed, Feb 7, 2018 at 12:53

Re: Table column headings PgAmin4

2018-02-07 Thread David G. Johnston
On Wed, Feb 7, 2018 at 1:00 PM, Strauch, Sheldon wrote: > Ted and David, > > Howdy! I too desperately crave this feature in pgAdmin. In light of the > fact that there are now three of us interested in this, I have created the > feature request in RedMine: https://redmine.postgresql.org/issues/309

Re: Table column headings PgAmin4

2018-02-07 Thread David G. Johnston
On Wed, Feb 7, 2018 at 11:47 AM, Ted Jones wrote: > Hi David > > I'm sorry but I'm not sure what you mean! Can you give me a simple > example? Thanks. > > ​Something like in the attached image.​ [image: Inline image 1]

Re: Table column headings PgAmin4

2018-02-07 Thread Ted Jones
ubject: Re: Table column headings PgAmin4 On Wed, Feb 7, 2018 at 11:01 AM, Ted Jones wrote: Hi Murtuza Thank you for your reply. Unfortunately it is not practical to use this approach when there may be 100s of columns! I will look at pgfutter. ​When faced with this situation, a

Re: Table column headings PgAmin4

2018-02-07 Thread David G. Johnston
On Wed, Feb 7, 2018 at 11:01 AM, Ted Jones wrote: > Hi Murtuza > > Thank you for your reply. Unfortunately it is not practical to use this > approach when there may be 100s of columns! I will look at pgfutter. > ​When faced with this situation, and feeling unmotivated to go learn a new tool, I r

Re: Table column headings PgAmin4

2018-02-07 Thread Ted Jones
, February 07, 2018 5:33 PM Subject: Re: Table column headings PgAmin4 You can use builtin COPY tool to load the CSV data into the table but the destination table must be present before you load CSV. COPY your_table(column_1, column_2, column_3...column_N) FROM 'C:\tmp\mydata.csv'

Re: Table column headings PgAmin4

2018-02-07 Thread Murtuza Zabuawala
You can use builtin COPY tool to load the CSV data into the table but the destination table must be present before you load CSV. COPY your_table(column_1, column_2, column_3...column_N) FROM 'C:\tmp\mydata.csv' DELIMITER ',' CSV HEADER;

Re: Table column headings PgAmin4

2018-02-07 Thread Melvin Davidson
First, please note that PgAdmin4 is just an interface to PostgreSQL, so it is very helpful if you state the actual version of PostgreSQL and O/S you are working with.IE: SELECT version(); >Can the column headings be taken from the first line of the csv file? Yes. >Additionally, I have tried

Table column headings PgAmin4

2018-02-07 Thread TedJones
I am quite new to PostgreSQL and I am having difficulty with the following: I am trying to input a csv file into a table that has a very large number of columns. This means that it is impractical to create a table and specify the name of all the columns. Can the column headings be taken from the f