Re: effective_cache_size vs units - Mailing list pgsql-hackers

From Tom Dunstan
Subject Re: effective_cache_size vs units
Date
Msg-id 45892FA1.6060808@tomd.cc
Whole thread Raw
In response to Re: effective_cache_size vs units  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: effective_cache_size vs units  (Peter Eisentraut <peter_e@gmx.net>)
List 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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: column ordering, was Re: [PATCHES] Enums patch v2
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Interface for pg_autovacuum