Re: Function call - Mailing list pgsql-novice

From Andreas Kretschmer
Subject Re: Function call
Date
Msg-id 20090124102329.GA9547@tux
Whole thread Raw
In response to Function call  ("Nico Callewaert" <callewaert.nico@telenet.be>)
List pgsql-novice
Nico Callewaert <callewaert.nico@telenet.be> schrieb:
> Function call :
>
> select update_afdeling('I', 1, 'afdeling 1', current_timestamp)
>
>
> Error message :
>
> ERROR:  function update_afdeling(unknown, integer, unknown, timestamp with time
> zone) does not exist
> LINE 1: select update_afdeling('I', 1, 'afdeling 1', current_timesta...
>                ^
> HINT:  No function matches the given name and argument types. You might need to
> add explicit type casts.
>
>
> ********** Error **********
>
> ERROR: function update_afdeling(unknown, integer, unknown, timestamp with time
> zone) does not exist
> SQL state: 42883
> Hint: No function matches the given name and argument types. You might need to
> add explicit type casts.
> Character: 8
>
>
> What I understand is : the function doesn't match the parameters in the call,
> but I don't have any idea what I'm doing wrong...
> I already tried to replace the parameter types with VARCHAR instead of TEXT,
> but same error.

Cast the current_timestamp to timestamp:

select update_afdeling('I', 1, 'afdeling 1', current_timestamp::timestamp)


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

pgsql-novice by date:

Previous
From: "Nico Callewaert"
Date:
Subject: Function call
Next
From: "Nico Callewaert"
Date:
Subject: Re: Function call