postgresql insert from select query, plus static values
You can put static values into SELECT clause.


INSERT INTO new_tbl (column1, column2, column3)
    SELECT DISTINCT id, 'a string', 0 FROM -- long where clause --;