Re: effective_cache_size vs units

Поиск
Список
Период
Сортировка
От Andrew Hammond
Тема Re: effective_cache_size vs units
Дата
Msg-id 1167521784.582986.264710@h40g2000cwb.googlegroups.com
обсуждение исходный текст
Ответ на Re: effective_cache_size vs units  (Benny Amorsen <benny+usenet@amorsen.dk>)
Ответы Re: effective_cache_size vs units  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: effective_cache_size vs units  (Jim Nasby <decibel@decibel.org>)
Список pgsql-hackers
Benny Amorsen wrote:
> >>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: TODO: GNU TLS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: effective_cache_size vs units