How much speed you’re leaving at the table if you use default locale?

I've been to PGConf.dev recently, and one of the talks was about collations.

The whole talk was interesting (to put it mildly), but the thing that stuck with me is that we really shouldn't be using default collation provider (libc with locale based collation), unless it's really needed, because we're wasting performance. But how much of a hit is it?

Continue reading How much speed you're leaving at the table if you use default locale?

Why is “depesz” between “de luca” and “de vil”?

Every so often someone asks why sorting behaves irrational. Like here:

$ SELECT string FROM test ORDER BY string;
  string
----------
 dean
 deer
 de luca
 depesz
 de vil
 dyslexia
(6 ROWS)

Why aren't “de luca" and “de vil" together?

Continue reading Why is “depesz" between “de luca" and “de vil"?

Waiting for 9.1 – Per-column collation support

On 8th of February, Peter Eisentraut committed patch:

Per-column collation support
 
This adds collation support for columns and domains, a COLLATE clause
to override it per expression, and B-tree index support.
 
Peter Eisentraut
reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
 
Branch
------
master

Continue reading Waiting for 9.1 – Per-column collation support