Обсуждение: Upgrade 7.2.1 to 7.3.4 datetime Error

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

Upgrade 7.2.1 to 7.3.4 datetime Error

От
Eko Pranoto
Дата:
Hey folks..
I have problem when upgrade from 7.2.1 to 7.3.4
with function I create...

How I can fix it ?

Thank you for any suggestion
EKo Pranoto


--------------Message Recieve----------------------
ERROR:  Function datetime(timestamp with time zone) does not exist
        Unable to identify a function that satisfies the given argument types
        You may need to add explicit typecasts

-----------------FUNCTION------start-------------
CREATE FUNCTION "set_waktu" ()
RETURNS timestamp without time zone AS 'set datestyle to ''european'';
set datestyle to ''sql'';
select datetime(now()) as result' LANGUAGE 'sql';
---------------FUNCTION--------end-------------



Re: Upgrade 7.2.1 to 7.3.4 datetime Error

От
"scott.marlowe"
Дата:
On Wed, 1 Oct 2003, Eko Pranoto wrote:

> Hey folks..
> I have problem when upgrade from 7.2.1 to 7.3.4
> with function I create...
>
> How I can fix it ?

add this to template1 on the 7.3.4 database before importing into it:

create domain datetime as timestamptz;


Re: Upgrade 7.2.1 to 7.3.4 datetime Error

От
Tom Lane
Дата:
Eko Pranoto <koprapostgres@telkom.net> writes:
> select datetime(now()) as result' LANGUAGE 'sql';

"datetime" isn't a standard type name anymore.  Use "timestamp".

            regards, tom lane