Re: effective_cache_size vs units - Mailing list pgsql-hackers

From Tom Lane
Subject Re: effective_cache_size vs units
Date
Msg-id 16054.1166584529@sss.pgh.pa.us
Whole thread Raw
In response to Re: effective_cache_size vs units  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: effective_cache_size vs units  (Tom Dunstan <pgsql@tomd.cc>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> Nor do I believe that we'd ever accept a future patch that made
>> the distinction between "kb" and "kB" significant --- if you think
>> people are confused now, just imagine what would happen then.

> As I said elsewhere, I'd imagine future functionality like a units-aware 
> data type, which has been talked about several times, and then this 
> would be really bad.

Only if the units-aware datatype insisted on case-sensitive units, which
is at variance with the SQL spec's treatment of keywords, the existing
practice in postgresql.conf, the existing practice in our datatypes such
as timestamp and interval:

regression=# select '20-dec-2006'::timestamp;     timestamp      
---------------------2006-12-20 00:00:00
(1 row)

regression=# select '20-DEC-2006'::timestamp;     timestamp      
---------------------2006-12-20 00:00:00
(1 row)

regression=# select '20-Dec-2006 America/New_York'::timestamptz;     timestamptz       
------------------------2006-12-20 00:00:00-05
(1 row)

regression=# select '20-Dec-2006 AMERICA/NEW_york'::timestamptz;     timestamptz       
------------------------2006-12-20 00:00:00-05
(1 row)

regression=# select '20-Dec-2006 PST'::timestamptz;     timestamptz       
------------------------2006-12-20 03:00:00-05
(1 row)

regression=# select '20-Dec-2006 pst'::timestamptz;     timestamptz       
------------------------2006-12-20 03:00:00-05
(1 row)

regression=# select '1 day'::interval;interval 
----------1 day
(1 row)

regression=# select '1 DAY'::interval;interval 
----------1 day
(1 row)

and in general, there is simply not any other part of Postgres or SQL
that you can point to that supports the idea that case sensitivity
for keywords is expected behavior.  So I think we'd flat-out reject
any such datatype.

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


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Companies Contributing to Open Source
Next
From: ITAGAKI Takahiro
Date:
Subject: Re: [PATCHES] Load distributed checkpoint patch