The prefix project is about matching a literal against prefixes in your table, the typical example being a telecom routing table. Thanks to the excellent work around generic indexes in PostgreSQL with GiST, indexing prefix matches is easy to support in an external module. Which is what the prefix extension is all about.
Maybe you didn’t come across this project before, so here’s the typical query you want to run to benefit from the special indexing, where the @> operator is read contains or is a prefix of:
The problem was raised this week on IRC and this time again I felt it would be a good occasion for a blog entry: how to load an XML file content into a single field?
The usual tool used to import files is COPY, but it’ll want each line of the file to host a text representation of a database tuple, so it doesn’t apply to the case at hand. RhodiumToad was online and offered the following code to solve the problem:
As it happens, I’ve got some environments where I want to make sure HOT (
aka Heap Only Tuples) is in use. Because we’re doing so much updates a
second that I want to get sure it’s not killing my database server. I not
only wrote some checking view to see about it, but also made
a
quick article about
it in the French PostgreSQL website. Handling
around in #postgresql
means that I’m now bound to write about it in
English too!