Ver código fonte

v.db.addtable: Do not create unique index from this script; v.db.connect will try to create it again causing some drivers to fail (PostgreSQL)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73995 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 6 anos atrás
pai
commit
3b2a42438f
1 arquivos alterados com 0 adições e 10 exclusões
  1. 0 10
      scripts/v.db.addtable/v.db.addtable.py

+ 0 - 10
scripts/v.db.addtable/v.db.addtable.py

@@ -139,16 +139,6 @@ def main():
         except CalledModuleError:
             grass.fatal(_("Unable to create table <%s>") % table)
 
-        # create index, see db/driver/*/index.c
-        if driver != "dbf":
-            sql = "CREATE UNIQUE INDEX %s_%s ON %s (%s)" % (table, key, table, key)
-            try:
-                grass.run_command('db.execute',
-                                  database=database, driver=driver, sql=sql)
-            except:
-                grass.warning(_("Unable to create index on table <%s>") % table)
-                pass
-
     # connect the map to the DB:
     if schema:
         table = '{schema}.{table}'.format(schema=schema, table=table)