add pgsql select from db test;
structure fixes