Как я могу сделать такой запрос в Postgres?
IF (select count(*) from orders) > 0 THEN DELETE from orders ELSE INSERT INTO orders values (1,2,3);