Re: Function call - Mailing list pgsql-novice

From Nico Callewaert
Subject Re: Function call
Date
Msg-id 7E53BFB016944B048A5D61DDEA8D9E4A@etsinformatics.local
Whole thread Raw
In response to Function call  ("Nico Callewaert" <callewaert.nico@telenet.be>)
Responses Re: Function call
List pgsql-novice
Hi again,

I tried your solution, but it gives me still the same error message.  But
there is a dotted line under the funcion name, like the error is pointing to
the function name.  Is that the correct way to execute a function, using
SELECT ?

Thanks again, Nico


----- Original Message -----
From: "Andreas Kretschmer" <akretschmer@spamfence.net>
To: <pgsql-novice@postgresql.org>
Sent: Saturday, January 24, 2009 11:23 AM
Subject: Re: [NOVICE] Function call


> 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°
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>
>



pgsql-novice by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Function call
Next
From: Andreas Kretschmer
Date:
Subject: Re: Function call