Monotone-Revision: 9054022ef1ca8aeba6e34842d27d9b94ce002b89 Monotone-Author: dev-unix.inverse.qc.ca Monotone-Date: 2006-06-15T19:34:10 Monotone-Branch: ca.inverse.sogo
24 lines
580 B
Python
Executable file
24 lines
580 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
import os, sys
|
|
|
|
HOST="localhost"
|
|
USER="agenor"
|
|
DB="agenortabledb"
|
|
|
|
for i in range(10000, 60000):
|
|
NEWTABLE="agenor_tab_%i" % ( i, )
|
|
|
|
TABLECREATE="""CREATE TABLE %s
|
|
( pkey INT PRIMARY KEY,
|
|
startdate INT NOT NULL,
|
|
endate INT NOT NULL,
|
|
title VARCHAR(1000) NOT NULL,
|
|
participants VARCHAR(100000) NOT NULL);""" % ( NEWTABLE, )
|
|
|
|
CALL="echo '%s' | psql -h %s %s %s" % ( TABLECREATE, HOST, DB, USER )
|
|
res=os.system(CALL)
|
|
#res = 1
|
|
#print "CALL:", CALL
|
|
print "%s res: %i" % ( NEWTABLE, res )
|