NUMERIC key word

Поиск
Список
Период
Сортировка
Искать

NUMERIC key word

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Вложения:
In 8.3, it appears that NUMERIC doesn't need to be a key word any longer.  See 
attached patch.  Was there a reason this was kept in the parser?  Otherwise 
we could remove it in 8.4.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: NUMERIC key word

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> In 8.3, it appears that NUMERIC doesn't need to be a key word any longer.  See 
> attached patch.  Was there a reason this was kept in the parser?  Otherwise 
> we could remove it in 8.4.

The reason it was kept was to override the search path --- unqualified
NUMERIC will always be taken as pg_catalog.numeric even if you have some
other type "numeric" in front of it.  I believe we had concluded that this
behavior is required by the SQL spec.  In any case, it would be kinda
weird for DECIMAL to have that behavior and NUMERIC not.

			regards, tom lane

Re: NUMERIC key word

От:
Neil Conway <neilc@samurai.com>
Дата:
On Tue, 2008-01-29 at 13:20 -0500, Tom Lane wrote:
> The reason it was kept was to override the search path --- unqualified
> NUMERIC will always be taken as pg_catalog.numeric even if you have some
> other type "numeric" in front of it.

It should be possible to implement this behavior without requiring
NUMERIC to be a keyword, though.

-Neil


Re: NUMERIC key word

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Neil Conway  writes:
> On Tue, 2008-01-29 at 13:20 -0500, Tom Lane wrote:
>> The reason it was kept was to override the search path --- unqualified
>> NUMERIC will always be taken as pg_catalog.numeric even if you have some
>> other type "numeric" in front of it.

> It should be possible to implement this behavior without requiring
> NUMERIC to be a keyword, though.

Perhaps we could find some other, even uglier kludge ... I doubt it
would be an improvement.  Is there any particular reason NUMERIC
*shouldn't* be a keyword?  It's called out as a  by
the spec, after all.  (In fact, I seem to recall that it was exactly
that point that made us decide that the implicit conversion to
pg_catalog.numeric was appropriate.)

			regards, tom lane
FAQ