18 lines
466 B
Plaintext
18 lines
466 B
Plaintext
|
#!/usr/bin/python3
|
||
|
|
||
|
import psycopg2
|
||
|
|
||
|
db = psycopg2.connect("")
|
||
|
|
||
|
csr = db.cursor()
|
||
|
csr.execute("drop table if exists t_pgcollate")
|
||
|
csr.execute("create table t_pgcollate(t text)")
|
||
|
for c in range(1, 0xD800):
|
||
|
csr.execute("insert into t_pgcollate(t) values(%s)", (chr(c),))
|
||
|
for c in range(0xE000, 0x110000):
|
||
|
csr.execute("insert into t_pgcollate(t) values(%s)", (chr(c),))
|
||
|
db.commit()
|
||
|
csr.execute("select * from t_pgcollate order by t")
|
||
|
for r in csr:
|
||
|
print(r)
|