postgres: fix queries for prop create index, and for primary keys

they were totally broken ;)