postgresql

pgxc_ctl部署postgresql-xl集群

pgxc_ctl部署postgresql-xl集群

using pgxc_ctl Deploy postgresql-xl cluster

suo.li
Intro PostgreSQL PostgreSQL也叫Postgres,是一个开源的关系型数据库管理系统。其强调可扩展性和 对SQL语言的兼容性。其起源于加州大学伯克利分校的Ingres数据库,最先的名字叫 POSTGRES,为了突出对SQL的兼容性而改为了Postgr
Postgresql python

Postgresql python

Postgresql python

suo.li
Code #!/usr/bin/env python from psycopg2 import connect from random import randrange from sys import argv insertNu = argv[1] # create a connection conn = connect(database="testdb", user="postgres", password="", host="localhost", port="5432") print "Connection is OK." # data to insert nameList = ["Paul", "Allen", "Teddy", "Alice", "bob", "jack", "leslie", "cheung", "jay"] cityList = ["California", "Beijing", "Chendu", "Silicon Valley", "Lisbon", "Moby", "Heihe", "Neimeng", "Heilj"] cur = conn.cursor() for i in range(5001, int(insertNu)): cur.execute("INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY) VALUES ("+ str(i + 1) +", \'"+ str(nameList[randrange(len(nameList))]) +"\', "+ str(randrange(20, 40)) +", \'"+ str(cityList[randrange(len(nameList))]) +"\', "+ str(float(randrange(20000,40000,3000))) +" )") conn.commit() print "Inserted." conn.close()