Adapted initialization detection to pgsql
Adaptations for postgresql