Thank you. I am starting to work on converting MS SQL to PostgreSQL so this is helpful.
There is some minor confusion in your first example. Based on the order of the INSERT statements I would have thought that the David record would have been assigned employee_id of 3. However this row gets deleted because he was apparently assigned employee_id 2? Is there something else going on that would have changed the order of assignment?
I get what you are showing, but it seems that might be confusing for some who are not familiar with the SERIAL pseudo-type and sequences.