My small PostegreSQL tricks
PostgreSQL is a very cool
database which scales very nicely, and implements the SQL standard very
well. I've used it for many fun projects, for managing large and small
geographical, financial and other datasets, with lots of users.
- strip_accepts is a PostgreSQL function for removing accents from Latin characters, so that 'écoutez-moi' becomes 'ecoutez-moi'
- requires a UTF-8 database
- removes many kinds of diacritical marks from Unicode Latin 1, Latin Extended A, Latin Extended B and Latin Extended (for example Polish, French, Vietnamese...)
- useful for keyword searches and indexing
- generated by make-strip_accents.py which can easily be extended
- strip-tsearch-objects.py for stripping tsearch2 objects from a dump, useful for 8.1 -> 8.2 migration
- dump your database and strip the tsearch objects with this filter
- look through the dump to make sure it hasn't skipped anything you
wanted to keep by mistake :-)
- create your new database in 8.2
- install the new version of tsearch2.sql from postgresql-contrib-8.2
(probably not necessary with 8.3 as it's built in, I haven't tried
it yet)
- then install your stripped dump