Fix small SQL issues

Cleans up sql files from postgres folder and removes debug statements in transaction operation