Change "" to '' in PostgreSQL commands for strings

Postgres interprets "" as column references; to have interpret string content as string content, it must be included in single quotes.

Also, in the first transaction (putting DB in read only mode), the notice was first set and later unset. Fixed that too.