Postgresql 我可以创建一个函数,但无法调用它

Postgresql 我可以创建一个函数,但无法调用它,postgresql,Postgresql,我试图在postgres中创建一个函数,创建查询已成功执行,但当我尝试调用该函数时,出现了错误 CREATE OR REPLACE FUNCTION sp_generate_random_locations( "nwclatitude" NUMERIC, "nwclongitude" NUMERIC, "seclatitude" NUMERIC, "seclongitude" NUMERIC, "type" TEXT, "count" INTEGER, "runid" TEXT

我试图在postgres中创建一个函数,创建查询已成功执行,但当我尝试调用该函数时,出现了错误

 CREATE OR REPLACE FUNCTION sp_generate_random_locations(
 "nwclatitude" NUMERIC,
 "nwclongitude" NUMERIC,
 "seclatitude" NUMERIC,
 "seclongitude" NUMERIC,
 "type" TEXT,
 "count" INTEGER,
 "runid" TEXT
 ) RETURNS INT AS
 $BODY$
 DECLARE
 counter INTEGER := 0 ; 
 id uuid := uuid_generate_v1();
 responder_latitude FLOAT(5):= nwclatitude+(seclatitudenwclatitude)*RANDOM();
 responder_longitude FLOAT(5):= nwclongitude+(seclongitudenwclongitude)*RANDOM();
 BEGIN
 LOOP
 EXIT WHEN counter=count;
--some task
END LOOP;
END;
$BODY$
LANGUAGE plpgsql 
SECURITY DEFINER 
SET search_path = admin, pg_temp;
现在如果我尝试用下面的命令调用函数

SELECT aed_modeling.sp_generate_random_locations(“nwclatitude” := 54.42 ,”nwclongitude” := 10.05 ,”seclatitude” := 54.14, “seclongitude” := 10.48,”type” :=’mobile’ ,”count” :=4 ,”runid” := ‘94984cb0-5f69-4326-b492-34fb19c39fc3’);
但是我得到了下面的错误

42883: function sp_generate_random_locations(“nwclatitude” => numeric, ”nwclongitude” => numeric, ”seclatitude” => numeric, “seclongitude” => numeric, ”type” => unknown, ”count” => integer, ”runid” => unknown) does not exist

我不知道我错过了什么。请注意,使用的“runid”不是uuid,我将其用作字符串。即使我使用
::text强制转换变量“type”和“runid”,它也不起作用

回复晚,是的,根据评论,问题在于双引号不正确。复制粘贴问题:-D


例如,
“nwclatude”:=54.42应为“nwclatude”:=54.42

响应延迟,是根据评论,问题在于双引号不正确。复制粘贴问题:-D


例如,
“nwclatude”:=54.42应为“nwclatude”:=54.42

已尝试创建或替换函数aed_modeling.sp_generate_random_location(没有公共创建的模式);
“nwclatude”:=54.42应为
“nwclatude”:=54.42
而不是
)。事实上,你根本不需要那些可怕的双引号。最好的解决办法是将它们全部删除。但是如果你坚持使用它们,请使用正确的直接的
双引号,而不是印刷的双引号。是的,问题可能是
的使用不正确。”
'
而不是
。已尝试创建或替换函数aed_modeling.sp_generate_random_location(没有将公开创建的架构)
“nwclatude”:=54.42
应该是
“nwclatude”:=54.42
而不是
))。实际上你根本不需要那些可怕的双引号。最好的解决方案是将它们全部移除。但是如果你坚持使用它们,请使用正确的直接的双引号,而不是印刷的双引号。是的,问题可能是错误地使用了
,而不是