- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是疯了还是傻了?
dev=# \df abuse_resolve
List of functions
-[ RECORD 1 ]-------+------------------------------------------------------------------------------------------------------------------------------------
Schema | public
Name | abuse_resolve
Result data type | record
Argument data types | INOUT __abuse_id bigint, OUT __msg character varying
Type | normal
dev=# select abuse_resolve('30'::bigint);
ERROR: function abuse_resolve(bigint) does not exist
LINE 1: select abuse_resolve('30'::bigint);
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
这是CREATE FUNCTION
,我省略了代码的主要内容,但这应该是无关紧要的:
CREATE OR REPLACE FUNCTION abuse_resolve(INOUT __abuse_id bigint, OUT __msg character varying) RETURNS record AS $_$
DECLARE
__abuse_status VARCHAR;
BEGIN
...snip...
UPDATE abuse SET abuse_status = __abuse_status,
edate = now(),
closed_on = now()
WHERE abuse_id = __abuse_id;
__msg = 'SUCCESS';
END;
$_$ LANGUAGE plpgsql SECURITY DEFINER;
只是为了咯咯笑:
GRANT ALL ON FUNCTION abuse_resolve(INOUT __abuse_id, OUT __msg character varying) TO PUBLIC;
GRANT ALL ON FUNCTION abuse_resolve(INOUT __abuse_id, OUT __msg character varying) TO myuser;
那个函数好像是存在的。我可能缺少什么?
这个解决了,答案是:我傻了。我最初没有正确定义参数,但我的代码使用了正确的参数。有一个额外的 bigint
在那里没有任何业务。
最佳答案
嗯,有点奇怪。我做了:
steve@steve@[local] =# create function abuse_resolve(inout __abuse_id bigint,
out __msg text) returns record language plpgsql as
$$ begin __msg = 'ok'; end; $$;
CREATE FUNCTION
steve@steve@[local] =# \df abuse_resolve
List of functions
-[ RECORD 1 ]-------+----------------------------------------
Schema | so9679418
Name | abuse_resolve
Result data type | record
Argument data types | INOUT __abuse_id bigint, OUT __msg text
Type | normal
steve@steve@[local] =# select abuse_resolve('30'::bigint);
-[ RECORD 1 ]-+--------
abuse_resolve | (30,ok)
您对该数据库有任何其他问题吗?你能用转储/恢复复制它并在新副本上试试这个吗?使用“公共(public)”模式明确限定函数名有帮助吗?您使用的是哪个版本的 PostgreSQL?
更新:sql 函数它也适用于我使用:
create function abuse_resolve(inout __abuse_id bigint, out __msg text)
language sql as $$ select $1, 'ok'::text $$;
关于postgresql - "function does not exist,"但我真的认为它确实如此,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9679418/
我要选择column1小于或等于 column2 的数据.但是,当我尝试使用 { console.log(notify) res.render('index', { title
我在页面中有一个更新面板,供用户指定事件的“所有者”。该所有者将是我们事件目录中的用户。该面板允许用户输入一些文本,然后单击搜索按钮以在我们的 Active Directory 中查找匹配的用户。当用
我想知道为什么同一个实体在控制台中调用的浏览器 window 对象中有不同的表示: 如果我们仅在浏览器控制台内调用window,我们将获得完整的浏览器信息。其中文档将表示为类似对象的实体,包括各种 P
我有一个正在处理大量数据的应用程序,我正在监视它的 .NET 内存性能计数器。基于性能计数器,所有堆中的#Bytes 正在缓慢增长(每 12 小时约 20MB)。所有 3 代也被收集(gen0 每秒几
According to documentation 默认实现不执行任何操作。 但是...我从 drawRect 方法中抛出异常并且我看到了下一个调用堆栈 3 EasyWakeup
我使用 package maven 插件构建了一个 Spring 应用程序的 jar。在本地,我可以运行它java -jar -Dspring.profiles.active=dev target/m
我们正在开发一种软件,我们可以在其中预览和记录从视频采集卡采集的输入视频源。预览是用DirectShow实现的,录制是用Media Foundation实现的(老软件慢慢升级到MediaFound
我在 symfony 中构建了一个简单的操作,它通过 wkhtmltopdf 生成一个 PDF 文件并将其输出到浏览器。 代码如下: $response = $this->getResponse(
这将是一个简短的问题。 来源在这里:https://github.com/exhuma/grc 标题解释了我的问题;) 我注册并上传了包到pypi。现在,如果我运行 easy_install grc,
我需要将事务与LINQ to SQL一起使用,并且正在阅读以熟悉它。 确实已处理SubmitChanges吗? 最佳答案 当您调用SubmitChanges时,LINQ to SQL将检查一组已知对象
在 Ajax 结果之后,我试图淡出 html 按钮。这在大多数情况下都有效,但有时按钮不会淡出,我不明白为什么。 $.ajax({ type: frm.attr('method'),
我以这样的方式创建 Cesium.Primitive: _createPrimitive: function (linesNumber) { var instances = [
我正在 Spring 上构建一个 Web 应用程序。 我很困惑是否应该在配置中使用 mvc:annotation-driven 还是 context:annotation-config 来扫描注释来处
问题 - 给定一个字符串 '0'、'1' 和 '?'。生成所有可能的字符串,您可以在其中替换“?”用“0”或“1”? 例如 - 输入 - “0??” 输出 - “000”、“001”、“010”、“0
总结: 修改wxwidgets Hello World tutorial中的代码后在 CppMicroServices 框架中的“模块”中,使用事件表或 Bind() 注册的事件似乎不会触发,但使用
我的 Capistrano 任务失败了 No such file or directory @ rb_sysopen - /home/blog/pids/grantb.blog.staging.pid
我们在 repo 协议(protocol)中有一个配置文件,所有用户都根据他们的功能做出贡献。对于我的本地测试,我需要手动更改该配置文件中的两个值,但我不想将我的更改提交回服务器。 但是,如果存储库中
我在顶部菜单(ListItems)的开头插入一个菜单选项并使用 $('#newMenuItem').show('slide'); 成功了。但是,我不喜欢它从左上角滑入的方式,所以我将其更改为 $('#
我尝试在我的 NSWindow 上调用 setFrame:display:animate: 并且没有执行任何操作,但是如果我在同一个窗口上调用 setFrame:display:,它有效。 我需要做其
我是一名优秀的程序员,十分优秀!