Legacy app not working with newer PG, is there a quick fix?

Поиск
Список
Период
Сортировка
От Lars Gustafsson
Тема Legacy app not working with newer PG, is there a quick fix?
Дата
Msg-id C00A8F2B-0D91-41C8-970A-B23F4082ACE5@me.com
обсуждение исходный текст
Ответы Re: Legacy app not working with newer PG, is there a quick fix?  (Sameer Kumar <sameer.kumar@ashnik.com>)
Re: Legacy app not working with newer PG, is there a quick fix?  (Andreas Kretschmer <andreas@a-kretschmer.de>)
Список pgsql-novice
I have a legacy client java application that I try to run against a new Postgres server.
All data migrates as expected. Everything seems to work ok, except for one thing.

ERROR:  function to_date(timestamp without time zone, unknown) does not exist at character 9
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

The application was written with and works with PG 8.2.3

I understand that from PG 8.3 explicit typecasting is necessary, like:
to_date(cast(createddate as TEXT),'YYYY-MM-DD’)

But I do not have access to the source code. Is there a way to go around this, by creating a macro & function to
providethe type cast on the server side. 
Without having to change anything in the client application?

/Lars




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

Предыдущее
От: Danny Severns
Дата:
Сообщение: RE: Scaling / Number of simultaneous connections
Следующее
От: Sameer Kumar
Дата:
Сообщение: Re: Legacy app not working with newer PG, is there a quick fix?