0

我正在尝试从 Ignition(8.0.16)作为命名查询在 PostgreSQL 11 服务器中运行一个函数,并得到一个列索引错误。关于 Postgres 讨论此错误的所有地方都表明,这是所提供的参数和预期数量不匹配的问题。

它始终显示为超出范围的数字比提供的数字多一。即使更改为使用不同数量的参数。

我到处数 13:点火参数、测试参数、Ignition 中的函数调用、函数定义、表格。这是来自 Ignition 的函数调用:

SELECT insert_run_data(
:speed_in,
:avg_speed_in,
:coater_num_in,
:coater_op_in,
:finisher_in,
:helper1_in,
:helper2_in,
:coater_down_in,
:current_downtime_reason_in,
:hanging_downtime_reason_in,
:tabcode_in,
:start_time_in,
:end_time_in
);

在同一个命名查询窗口中,如果我注释掉函数调用并尝试使用相同的参数直接写入,它会毫无问题地写入:

insert into 
nh_coater_tabcode_operator_data(
speed, avg_speed, coater_num, coater_op, finisher, helper1,
helper2, coater_down, current_downtime_reason,
hanging_downtime_reason, tabcode, start_time, end_time
)
  
values(:speed_in, :avg_speed_in, :coater_num_in, :coater_op_in,
:finisher_in, :helper1_in, :helper2_in, :coater_down_in,
:current_downtime_reason_in, :hanging_downtime_reason_in, :tabcode_in,
:start_time_in, :end_time_in
);

该功能也可以在 PGAdmin 中正常运行。

以下是用于创建表和函数的 SQL、Ignition 的堆栈跟踪以及显示命名查询创作窗口参数匹配的图像的要点:

创建功能要点

创建表要点

错误要点的堆栈跟踪

点火参数

4

1 回答 1

0

点火设计器似乎缓存了该功能。因此,如果它被更改,您将需要保存并重新打开项目:打开另一个然后切换回来或关闭并打开一个新的设计器窗口。

于 2021-02-23T22:17:32.013 回答