Re: Cast for text->Integer missing in 8.3.5

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cast for text->Integer missing in 8.3.5
Дата
Msg-id 28791.1231870080@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cast for text->Integer missing in 8.3.5  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> On Tue, Jan 13, 2009 at 8:23 AM, Nykolyn, Andrew <andrew.nykolyn@ngc.com> wrote:
>> I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have found
>> that the cast text->integer and integer->text are missing.  Is there a
>> reason why they are not there and how can I get them back.  I have many
>> stored procedures that rely on those casts

> They were removed because the output was unpredictable.  It's far
> better to spend your time fixing your code than trying to reinstate
> buggy / questionable behaviour.

To clarify: those casts are not *gone*, they just don't occur implicitly
anymore.  You should put explicit casts into your functions in those
places where you actually intend an integer to be converted to text or
vice versa.  Don't be surprised if this turns up some bugs in your code,
ie places where you didn't really intend the semantics you were getting.

            regards, tom lane

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Trying to create implicit casts to text in PG 8.3
Следующее
От: "Nykolyn, Andrew"
Дата:
Сообщение: Re: Cast for text->Integer missing in 8.3.5