Re: Function call
От | Andreas Kretschmer |
---|---|
Тема | Re: Function call |
Дата | |
Msg-id | 20090124141350.GA11665@tux обсуждение исходный текст |
Ответ на | Re: Function call ("Nico Callewaert" <callewaert.nico@telenet.be>) |
Список | pgsql-novice |
Nico Callewaert <callewaert.nico@telenet.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 > SELECT ? 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_changedtimestamp without time zone) RETURNS integer AS $BODY$ BEGIN return 1; END; $BODY$ LANGUAGE plpgsql VOLATILECOST 100; CREATE FUNCTION Zeit: 0,607 ms test=*# select upd_afdeling('I'::text, 1::smallint, 'afdeling 1'::text, current_timestamp::timestamp); upd_afdeling -------------- 1 (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? 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 по дате отправления: