diff --git a/pyproject.toml b/pyproject.toml index c098599..03073f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rda_python_common" -version = "1.0.39" +version = "1.0.40" authors = [ { name="Zaihua Ji", email="zji@ucar.edu" }, ] diff --git a/src/rda_python_common/PgDBI.py b/src/rda_python_common/PgDBI.py index 96c32ba..4892b5b 100644 --- a/src/rda_python_common/PgDBI.py +++ b/src/rda_python_common/PgDBI.py @@ -46,6 +46,8 @@ DBNAMES = { 'ivaddb' : 'ivaddb', 'cntldb' : 'ivaddb', + 'ivaddb1' : 'ivaddb', + 'cntldb1' : 'ivaddb', 'cdmsdb' : 'ivaddb', 'ispddb' : 'ispddb', 'obsua' : 'upadb', @@ -113,20 +115,21 @@ def SETPGDBI(name, value): PGDBI['VHSET'] = 0 PGDBI['PGSIZE'] = 1000 # number of records for page_size PGDBI['MTRANS'] = 5000 # max number of changes in one transactions -PGDBI['MAXICNT'] = 12000000 # maximum number of records in each table +PGDBI['MAXICNT'] = 6000000 # maximum number of records in each table # # create a pgddl command string with # table name (tname), prefix (pre) and suffix (suf) # -def get_pgddl_command(tname, pre = None, suf = None): +def get_pgddl_command(tname, pre = None, suf = None, scname = None): ms = re.match(r'^(.+)\.(.+)$', tname) - if ms: - scname = ms.group(1) - tname = ms.group(2) - else: - scname = PGDBI['SCNAME'] + if not scname: + if ms: + scname = ms.group(1) + tname = ms.group(2) + else: + scname = PGDBI['SCNAME'] xy = '' if suf: xy += ' -x ' + suf if pre: xy += ' -y ' + pre