Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 6219

Questions on how to import into, extract data from, or exchange data between databases in CSV format (plain text using commas to separate values).

4
votes
The sequences are designed like that, the are not supposed to produce contiguous numbers. However, you can reset them before (re)trying the COPY with SELECT setval('sequence_name', (SELECT max(id) …
answered Jun 5 '14 by dezso
8
votes
If you have your first CSV loaded into a table, you can just as easily load the other one into a staging table (presumably with the same structure as the 'real' one). Then you can get the new rows … by SELECT * FROM staging_table EXCEPT SELECT * FROM real_table ; Rows missing from the new CSV can be get reversing the two sides around EXCEPT. However, given the lack of a key on the staging …
answered Aug 8 '12 by dezso
12
votes
] ( option [, ...] ) ] Which means you can do something like this: COPY my_table (mt_id, mt_name, mt_created_by, ...) FROM 'filename' [...] What you cannot do is to refer columns of the CSV
answered Mar 18 '16 by dezso
4
votes
You tell the COPY command to look for commas as delimiters (DELIMITERS ','), but there are no commas in your CSV. Use the 'text' format instead (it's the default, so you don't have to specify it) and do not specify a delimiter: The default is a tab character in text format. (source) …
answered Jun 5 '12 by dezso