Skip site navigation (1) Skip section navigation (2)

Re: Function call

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Function call
Date: 2009-01-24 14:13:50
Message-ID: 20090124141350.GA11665@tux (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Nico Callewaert <callewaert(dot)nico(at)telenet(dot)be> schrieb:

> 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

Sorry, you should also cast the 1 to smallint:

test=# CREATE OR REPLACE FUNCTION upd_afdeling(update_type text, in_afd_id smallint, in_afd_omschrijving text, in_date_changed timestamp without time zone) RETURNS integer AS $BODY$ BEGIN return 1; END; $BODY$ LANGUAGE plpgsql VOLATILE COST 100;
Zeit: 0,607 ms
test=*# select upd_afdeling('I'::text, 1::smallint, 'afdeling 1'::text, current_timestamp::timestamp);
(1 Zeile)

Zeit: 0,281 ms
test=*# select upd_afdeling('I'::text, 1, 'afdeling 1'::text, current_timestamp::timestamp);
ERROR:  function upd_afdeling(text, integer, text, timestamp without time zone) does not exist
LINE 1: select upd_afdeling('I'::text, 1, 'afdeling 1'::text, curren...
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

> Thanks again, Nico
> ----- Original Message ----- From: "Andreas Kretschmer" 

Please, no top-posting:

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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°

In response to


pgsql-novice by date

Next:From: Nico CallewaertDate: 2009-01-24 14:29:31
Subject: Re: Function call
Previous:From: Nico CallewaertDate: 2009-01-24 13:49:12
Subject: Re: Function call

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group