Re: varchar as primary key - Mailing list pgsql-general

From Tom Lane
Subject Re: varchar as primary key
Date
Msg-id 9642.1178248109@sss.pgh.pa.us
Whole thread Raw
In response to Re: varchar as primary key  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: varchar as primary key
List pgsql-general
Jeff Davis <pgsql@j-davis.com> writes:
> If you're using a non-C locale, it's slower than strcmp() too.
> PostgreSQL has to do an extra memcpy() in order to use strcoll(),
> because strings in postgresql aren't necessarily NULL-terminated and
> there's no such thing as strncoll(), unfortunately (a comment in the
> code points this out).

The memcpy is the least of the problem --- in many non-C locales,
strcoll() is simply a dog, because the collation rules are ridiculously
complex.

            regards, tom lane

pgsql-general by date:

Previous
From: "Mike Frysinger"
Date:
Subject: Re: cant get pg_dump/pg_restore to behave
Next
From: Tom Lane
Date:
Subject: Re: How to get comments for view columns?