added several views in postgresql scripts