Re: effective_cache_size vs units

From: "Andrew Hammond" <andrew(dot)george(dot)hammond(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: effective_cache_size vs units
Date: 2006-12-30 23:36:24
Message-ID: 1167521784.582986.264710@h40g2000cwb.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Benny Amorsen wrote:
> >>>>> "TL" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
> TL> Anyone against making it case-insensitive, speak now or hold your
> TL> peace.
>
> SI-units are inherently case-sensitive. The obvious example is that
> now you will allow people to specify an amount in millibytes, while
> interpreting it in megabytes.

And as Peter points out, there may be a desire to support SI-type units
in other parts of the database at some time in the future. It seems
like a questionable idea to break with convention just for ease of use.

> You are trying to interpret valid input as misspellings based on
> context, and then you silently guess at what the user really meant.
> That's MySQL behaviour!

I agree. But perhaps the solution instead of failing is to throw a
warning to the effect of "Not to be pedantic, but you said mb and
millibits as a unit doesn't make sense in this context. Assuming you
meant MB (MegaBits)." and then start up.

Generally I'm against guessing what the user really wants, but in this
case, it seems pretty difficult to guess wrong. But either way I'm
always dead set against _silently_ guessing.

Andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-12-31 01:16:45 Re: effective_cache_size vs units
Previous Message Martijn van Oosterhout 2006-12-30 23:27:16 Re: TODO: GNU TLS