postgresql - Ignore duplicates when importing from CSV -


i'm using postgresql database, after i've created table have populate them csv file. csv file corrupted , violates primary key rule , database throwing error , i'm unable populate table. ideas how tell database ignore duplicates when importing csv? writing script remove them csv file no acceptable. workarounds welcome too. thank you! : )

on postgresql, duplicate rows not permitted if violate unique constraint. think best option, import csv file on temp table has no constraint, delete duplicate values, , import temp table final table.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -