Re: [HACKERS] Numeric with '-'

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: [HACKERS] Numeric with '-'
Дата
Msg-id 3.0.1.32.20000221162853.01091a70@mail.pacifier.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Numeric with '-'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 12:57 AM 2/22/00 +0100, Peter Eisentraut wrote:

>Has the ranting resulted in any idea yet? ISTM that keeping a non-integer
>number as a string all the way to the executor shouldn't hurt too much.
>After all, according to SQL 123.45 *is* a NUMERIC literal! By making it a
>float we're making our users liable to breaking all kinds of fiscal
>regulations in some places. (Ask Jan.)

Certainly there was a time in the past, at least, where cross-compilers
frequently did something along these lines, if they were designed
to support a variety of target architectures.  Not so common now in the
compiler world since typically host and target both support IEEE
standard floating point operations, but 'twas so back in the days before
the standard existed and before hardware implementations proliferated.
It wouldn't impact the performance of query parsing and analysis noticably.

You have to take care when (for instance) folding operations on
constants - I suspect that somewhere in the 50K lines of the SQL92
draft or the 83K lines of the SQL3 draft precise rules for such 
things are laid down.  Though probably in an incomprehensible fashion!

>Speaking of 'unknown', this is my favourite brain-damaged query of all
>times:
>
>peter=> select 'a' like 'a';
>ERROR:  Unable to identify an operator '~~' for types 'unknown' and 'unknown'
>        You will have to retype this query using an explicit cast

That *is* very cool! :)  Postgres is an amazing beast at times!



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Beta for 4:30AST ... ?
Следующее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] Beta for 4:30AST ... ?