Re: Casting Varchar to Numeric

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Casting Varchar to Numeric
Дата
Msg-id 20011206150158.O28880-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Casting Varchar to Numeric  ("Andy Marden" <amarden@usa.net>)
Ответы Re: Casting Varchar to Numeric  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
On Mon, 3 Dec 2001, Andy Marden wrote:

> Martijn,
>
> It does work (believe it or not). I've now tried the method you mention
> below - that also works and is much nicer. I can't believe that PostgreSQL
> can't work this out. Surely implementing an algorithm that understands that
> if you can go from a ->b and b->c then you can certainly go from a->c. If

It's more complicated than that (and postgres does some of this but not
all), for example the cast text->float8->numeric potentially loses
precision and should probably not be an automatic cast for that reason.

> this is viewed as too complex a task for the internals - at least a diagram
> or some way of understanding how you should go from a->c would be immensely
> helpful wouldn't it! Daunting for anyone picking up the database and trying
> to do something simple(!)

There may be a need for documentation on this.  Would you like to write
some ;)


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Trigger problem
Следующее
От: Andrew Snow
Дата:
Сообщение: Re: How to make a REALLY FAST db server?