Re: effective_cache_size vs units

From: Tom Dunstan <pgsql(at)tomd(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: effective_cache_size vs units
Date: 2006-12-20 12:42:09
Message-ID: 45892FA1.6060808@tomd.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> (Hmm, I wonder what Tom Dunstan's enum patch does about case
> sensitivity...)

Currently enum labels are case sensitive. I was a bit ambivalent about
it... case insensitivity can lead to less surprises in some cases, but
many programming languages that have enums are case sensitive, and so
this wouldn't be a direct map for them. OTOH, if someone's doing evil
things like sticking labels that differ only in case into an enum,
perhaps they *should* be dissuaded. :)

The question is where does it end, though? Should we treat letters with
accents and umlauts as equivalent as well? Do we remove punctuation
characters? It gets into a (for me) more murky localization issue, and
I'm not familiar with the postgresql apis for handling that. Maybe it's
easy.

Since we basically accept any old thing into an enum label, I think we
probably shouldn't muck with it. If we want to have some sort of
normalized version, then we should probably restrict the characters that
we accept fairly severely.

Also note that enum values are far more likely to be set by application
code than by a human typing the value in directly, so in that sense the
need for case insensitivity seems somewhat diminished.

I suppose we should think about mysql refugees at some point, though. I
wonder what they do. The documentation is silent on the matter (and all
their examples are in lower case). Mysql is generally case insensitive,
right?

Cheers

Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Felipe Rondon Rocha 2006-12-20 12:43:52 Fw: Fw: choosing use an index or not
Previous Message Peter Eisentraut 2006-12-20 12:26:59 Re: column ordering, was Re: [PATCHES] Enums patch v2