fix query to load list of tables and added init scrips for postgresql

This commit is contained in:
yuli
2022-09-27 18:53:45 +03:00
parent cd1102eb6d
commit 3629037915
4 changed files with 2 additions and 2 deletions

View File

@@ -123,8 +123,8 @@ func (dbobj *PGSQLDB) OpenDB(dbname *string) error {
}
dbobj.db = db
// load all table names
q := "show tables"
tx, err := dbobj.db.Begin()
q := "SELECT table_name FROM information_schema.tables where table_schema NOT IN ('pg_catalog', 'information_schema');"
tx, err := dbobj.db.Begin()
if err != nil {
return err
}