Changeset 52060


Ignore:
Timestamp:
Jun 13, 2012 7:18:16 AM (4 years ago)
Author:
martinl
Message:

v.build.pg: add new flag (-p) to print SQL staments (dry run)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass-addons/grass7/vector/v.build.pg/v.build.pg.py

    r51964 r52060  
    4242#% type: double
    4343#% answer: 1
    44 #end
     44#%end
     45#%flag
     46#% key: p
     47#% description: Don't execute SQL statements, just print them and exit
     48#%end
    4549
    4650import os
     
    5458    else:
    5559        cmd = 'execute'
     60   
     61    if flags['p']:
     62        sys.stdout.write("\n%s\n\n" % sql)
     63        return
    5664   
    5765    ret = grass.run_command('db.%s' % cmd, sql = sql,
Note: See TracChangeset for help on using the changeset viewer.