Order all unicode code points by default postgresql collation
This commit is contained in:
commit
3ea5cbdbe7
|
@ -0,0 +1,17 @@
|
|||
#!/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)
|
Loading…
Reference in New Issue