db_converter.py

2014-11-13 09:01:43 -0500
a python script, ASCII text executable
Bytes: 9087 (~ 8.87 KiB)
MD5: 964ee01f8acbd73ab19126d3e8c39a60
SHA1: 3f1d2b5aafd416df37f61fc7ed016551f8b282aa

Hexdump of first 128 bytes

0000000: 2321 2f75 7372 2f62 696e 2f65 6e76 2070 #!/usr/bin/env p
0000010: 7974 686f 6e0a 0a22 2222 0a46 6978 6573 ython..""".Fixes
0000020: 2061 204d 7953 514c 2064 756d 7020 6d61 a MySQL dump ma
0000030: 6465 2077 6974 6820 7468 6520 7269 6768 de with the righ
0000040: 7420 666f 726d 6174 2073 6f20 6974 2063 t format so it c
0000050: 616e 2062 6520 6469 7265 6374 6c79 0a69 an be directly.i
0000060: 6d70 6f72 7465 6420 746f 2061 206e 6577 mported to a new
0000070: 2050 6f73 7467 7265 5351 4c20 6461 7461 PostgreSQL data

Hexdump of last 128 bytes

00022ff: 206f 7574 7075 742e 7772 6974 6528 225c output.write("\
000230f: 6e22 290a 2020 2020 6f75 7470 7574 2e77 n"). output.w
000231f: 7269 7465 2822 434f 4d4d 4954 3b5c 6e22 rite("COMMIT;\n"
000232f: 290a 2020 2020 7072 696e 7420 2222 0a0a ). print ""..
000233f: 0a69 6620 5f5f 6e61 6d65 5f5f 203d 3d20 .if __name__ ==
000234f: 225f 5f6d 6169 6e5f 5f22 3a0a 2020 2020 "__main__":.
000235f: 7061 7273 6528 7379 732e 6172 6776 5b31 parse(sys.argv[1
000236f: 5d2c 2073 7973 2e61 7267 765b 325d 290a ], sys.argv[2]).
Back to home | Back


Subscribe | Register | Login | N