Re: convert text file to database - Mailing list pgsql-novice

From e-letter
Subject Re: convert text file to database
Date
Msg-id 298a6f60804210752j42fce18br3316a15ae0511011@mail.gmail.com
Whole thread Raw
In response to convert text file to database  (e-letter <inpost@gmail.com>)
List pgsql-novice
I amended a copy of my csv files as follows:

2,OnlineGame,wwwflyordiecom,yyyy/mm/dd,1,player1,player2,0-1,normal,yyyy/mm/dd,1200,1d4d5...33Bf3Rxe50-1

3,OnlineGame,wwwflyordiecom,yyyy/mm/dd,1,player1,player2,0-1,normal,yyyy/mm/dd,1,player1,player2,1200,1e4d52e5d4...Nxf2#0-1

Compared to my original csv file, I had to remove the field names that
were in the csv file (e.g. event,onlinegame,site,www...,date,yyyy....

I also had to remove all full stop (.) characters, such as in the url
name and within the list of moves (e.g. 1. e4 d7 2. gf3...). Instead
of removing the full stops, could I have prefixed the character with
the backstroke (\), e.g. to become www\.flyordie\.com? The user guide
says so but when I tried the csv file import failed.

Moreover, I had to add an id number to represent the id primary key,
as the first column of data. I thought there would be a way to
automatically add this column to the csv file?

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remote / network connection fails
Next
From: e-letter
Date:
Subject: Re: convert text file to database