delta9
Guest
Ошибка при исполнении функции - No function matches the given name and argument types
Добрый день.
Есть ф-ция :
CREATE OR REPLACE FUNCTION public.foobar(date, text) RETURNS bool AS
'
DECLARE
ddate alias for $1;
dcomm alias for $2;
BEGIN
insert into TABLE (comm, on_date) values (dcomm, ddate);
RETURN true;
END;
'
LANGUAGE 'plpgsql' VOLATILE;
есть ее вызов в php-скрипте :
$sql = "select foobar('some text', '".date("Y-m-d",time())."')";
$res = sql_exec($sql);
И есть ошибка :
ERROR: function foobar("unknown", "unknown") does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.
Что я неправильно делаю? в чем косяк?
Заранее спасибо.
Добрый день.
Есть ф-ция :
CREATE OR REPLACE FUNCTION public.foobar(date, text) RETURNS bool AS
'
DECLARE
ddate alias for $1;
dcomm alias for $2;
BEGIN
insert into TABLE (comm, on_date) values (dcomm, ddate);
RETURN true;
END;
'
LANGUAGE 'plpgsql' VOLATILE;
есть ее вызов в php-скрипте :
$sql = "select foobar('some text', '".date("Y-m-d",time())."')";
$res = sql_exec($sql);
И есть ошибка :
ERROR: function foobar("unknown", "unknown") does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts.
Что я неправильно делаю? в чем косяк?
Заранее спасибо.