[OSM-dev] Inserting with planet-to-db [offender]
Stefan de Konink
skinkie at xs4all.nl
Sun Oct 21 16:15:34 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Martijn van Oosterhout schreef:
> The insert script should be using placeholders to avoid SQL injection attacks...
> Or at the very least proper escaping.
I replaced the string with entities_decode and applied quotes on them
using the DBI interface. It is now inserting at a rate of ~1000 nodes/s.
I'll send Nick the update of my code again, because I guess the same
thing applies to PostgreSQL too. (Varchars can't be longer than their
allocation.)
Stefan
ps. Currently inserted 8*10^6 so I guess I'm at 20%.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHG20WYH1+F2Rqwn0RCjTdAKCAThdJDokniOld5FmAV/g8kT215QCeJ8lJ
9XIDZP3+sMhkoerK7wcsIgA=
=5pUp
-----END PGP SIGNATURE-----
More information about the dev
mailing list