]> err.no Git - scalable-opengroupware.org/blob - Misc/db/tests/helge/fillfolderinfo.py
moved away old stuff
[scalable-opengroupware.org] / Misc / db / tests / helge / fillfolderinfo.py
1 #!/usr/bin/python
2
3 import pg
4
5 USER="agenor"
6 HOST="localhost"
7 DB="agenor_fldinfodb"
8 TABLE="SOGo_folder_info"
9
10 db = pg.DB(DB, HOST, 5432, "", "", USER);
11 print "connection:", db
12
13 for i in range(110001, 250000):
14     SQL=("INSERT INTO %s ( c_foldername, c_tablename, c_dbname ) " + \
15          "VALUES ( 'privcal_%i', 'agenor_tab_%i', 'agenortabledb' );") % \
16          ( TABLE, i, i, )
17     if i % 1000 == 0:
18         print "%i: %s" % ( i, SQL )
19     db.query(SQL)