I autogenerate INSERT INTO statements into .sql files.
When I read in this file several times into postgresql, I get duplicated entries. In my case this is rather annoying.
I suppose this is a feature in general, but in my case I want only unique entries, so the duplicates confuse me and I would prefer to do away with them completely, even before insertion-time happens.
Is there a way to somehow tell postgresql, or through the SQL statement, that it should not insert into the data if either
(a) the exact same sequence is already in that place or (b) if some entry, like id 555, already is populated (and thus, reject any new attempts to insert into id 555)