我有下一个功能:func1(a text, b text, c text)
。我用不同的文本 - func1(d,e,f)来表示它,当d是数字类型时,b是bigint类型,c是时区类型。我找到了一条评论,为了创建自动投射而消化,我这样做了:
CREATE CAST (int AS text) WITH INOUT AS IMPLICIT;
CREATE CAST (bigint AS text) WITH INOUT AS IMPLICIT;
CREATE CAST (numeric AS text) WITH INOUT AS IMPLICIT;
CREATE CAST (timezone AS text) WITH INOUT AS IMPLICIT;
现在突然,我在其他功能中遇到错误:
CREATE OR REPLACE FUNCTION Bl_Create_Flat_File_Pg.open_table (file_id utl_file.file_type,temp_variable text, p_percent_width bigint DEFAULT 100, p_border bigint DEFAULT 1) RETURNS VOID AS $body$
BEGIN
RAISE NOTICE 'INSIDE OPEN_TABLE FUNC';
**PERFORM utl_file.put_line(file_id, '<TABLE BORDER='||p_border||'
WIDTH='||p_percent_width||'%>');**
End;
我得到的错误是operator is not unique: unknown || bigint
。所以我决定删除我创建的演员阵容并且它解决了问题,但它又把我带到了第一阶段 - 尝试召唤函数而不需要手动编译..
有什么想法吗?