【发布时间】:2018-07-27 17:00:56
【问题描述】:
在 SQL 管理器中执行时我的函数会出现错误。 但是当我使用 Putty 和命令行时,我可以连接到我的数据库,但是当我尝试运行此功能时:
CREATE OR REPLACE FUNCTION s_sco."Group" (
)
RETURNS void AS
$body$
BEGIN
INSERT INTO tab1 ("group", "Name", "creator", "dat", "mod", "datm")
select distinct tab2.SSI,tab2.LIB , '123456', CURRENT_TIMESTAMP, '', to_timestamp('01/01/1900','DD/MM/YYYY') from tab2 WHERE
NOT EXISTS (select group from tab1 where group IN
(select SSI from tab2));
END;
$body$
LANGUAGE 'plpgsql'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100;
我不断收到此错误:
Function () does not exist.
No function matches the given name and argument types. You might need to add explicit type casts.
【问题讨论】:
-
可能是因为
group是保留字?也许尝试重命名函数并重新运行测试... -
不。请显示产生错误的语句。
-
我将函数重命名为“GroupS”,还是同样的问题。语句是“选择 GroupS();”
标签: postgresql centos putty