title: Postgres: How to 'INSERT INTO ... IF NOT EXISTS ...'
body: <p>I've got a postgres table keeping track of schedule time slots for a couple of different schools and I'm trying to write a function (in javascript using the node-postgres library) that inserts 1 new row per time slot per day per school for the upcoming week.</p>
  
  <p>Can anyone help me figure out the WITH command to be able to (in one query) check if a particular school/date/time combination already exists in the table and, if not, insert it? Does that make sense?</p>