We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
创建function 报 specified for unlabeled block
IvorySQL 3.0
Centos 7.9
=====具体代码如下 [ivorysql@ivorysqldb ~]$ psql -p 1521 -d postgres psql (16.0) Type "help" for help.
postgres=# CREATE TABLE LOGON_LOG_EN postgres-# ( postgres(# REC_ID NUMBER(20) NOT NULL, postgres(# COM_ID NUMBER(10) NOT NULL, postgres(# OPERATOR_NO VARCHAR2(10 CHAR) NOT NULL, postgres(# LOG_USER_NAME VARCHAR2(255 CHAR) NOT NULL, postgres(# LAST_LOGON_TIME DATE NOT NULL, postgres(# LOGON_PAGE VARCHAR2(1500 CHAR), postgres(# LOGON_IP VARCHAR2(50 CHAR), postgres(# REP_TIME TIMESTAMP(6) WITH TIME ZONE DEFAULT TO_DATE('1900-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS') NOT NULL, postgres(# SESSION_ID VARCHAR2(100 CHAR), postgres(# COOKIE_ID VARCHAR2(100 CHAR), postgres(# LOGON_TYPE VARCHAR2(2 CHAR), postgres(# PRE_LOGON_PAGE VARCHAR2(1500 CHAR), postgres(# LOGON_IN_CODE VARCHAR2(3 CHAR), postgres(# COOKIE_PID VARCHAR2(100 CHAR) postgres(# ); CREATE TABLE postgres=# postgres=# CREATE OR REPLACE FUNCTION "F_GET_LAST_LOGON_IP" ( postgres(# P_COMID NUMBER, postgres(# P_OPEARTORNO VARCHAR2 postgres(# ) postgres-# RETURN VARCHAR2 postgres-# IS postgres-# output_value VARCHAR2 (1000); postgres-# BEGIN postgres-# output_value := ''; postgres-# BEGIN postgres-# SELECT LOGON_IP postgres-# INTO output_value postgres-# FROM ( SELECT logon_ip postgres(# FROM logon_log_en postgres(# WHERE com_id = P_COMID AND operator_no = P_OPEARTORNO postgres(# ORDER BY last_logon_time DESC) postgres-# WHERE ROWNUM = 1; postgres-# EXCEPTION postgres-# WHEN OTHERS postgres-# THEN postgres-# RETURN (''); postgres-# END; postgres-# RETURN (output_value); postgres-# END F_GET_LAST_LOGON_IP; postgres-# / ERROR: end label "f_get_last_logon_ip" specified for unlabeled block LINE 18: END F_GET_LAST_LOGON_IP ^ QUERY: output_value VARCHAR2 (1000); BEGIN output_value := ''; BEGIN SELECT LOGON_IP INTO output_value FROM ( SELECT logon_ip FROM logon_log_en WHERE com_id = P_COMID AND operator_no = P_OPEARTORNO ORDER BY last_logon_time DESC) WHERE ROWNUM = 1; EXCEPTION WHEN OTHERS THEN RETURN (''); END; RETURN (output_value); END F_GET_LAST_LOGON_IP postgres=#
The text was updated successfully, but these errors were encountered:
谢谢反馈,确实是个Bug,我们会在接下来的3.2分支完成fix
Sorry, something went wrong.
This issue has been solved in 3.2, so close it.
bigplaice
No branches or pull requests
Bug Report
创建function 报 specified for unlabeled block
IvorySQL Version
IvorySQL 3.0
OS Version (uname -a)
Centos 7.9
=====具体代码如下
[ivorysql@ivorysqldb ~]$ psql -p 1521 -d postgres
psql (16.0)
Type "help" for help.
postgres=# CREATE TABLE LOGON_LOG_EN
postgres-# (
postgres(# REC_ID NUMBER(20) NOT NULL,
postgres(# COM_ID NUMBER(10) NOT NULL,
postgres(# OPERATOR_NO VARCHAR2(10 CHAR) NOT NULL,
postgres(# LOG_USER_NAME VARCHAR2(255 CHAR) NOT NULL,
postgres(# LAST_LOGON_TIME DATE NOT NULL,
postgres(# LOGON_PAGE VARCHAR2(1500 CHAR),
postgres(# LOGON_IP VARCHAR2(50 CHAR),
postgres(# REP_TIME TIMESTAMP(6) WITH TIME ZONE DEFAULT TO_DATE('1900-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS') NOT NULL,
postgres(# SESSION_ID VARCHAR2(100 CHAR),
postgres(# COOKIE_ID VARCHAR2(100 CHAR),
postgres(# LOGON_TYPE VARCHAR2(2 CHAR),
postgres(# PRE_LOGON_PAGE VARCHAR2(1500 CHAR),
postgres(# LOGON_IN_CODE VARCHAR2(3 CHAR),
postgres(# COOKIE_PID VARCHAR2(100 CHAR)
postgres(# );
CREATE TABLE
postgres=#
postgres=# CREATE OR REPLACE FUNCTION "F_GET_LAST_LOGON_IP" (
postgres(# P_COMID NUMBER,
postgres(# P_OPEARTORNO VARCHAR2
postgres(# )
postgres-# RETURN VARCHAR2
postgres-# IS
postgres-# output_value VARCHAR2 (1000);
postgres-# BEGIN
postgres-# output_value := '';
postgres-# BEGIN
postgres-# SELECT LOGON_IP
postgres-# INTO output_value
postgres-# FROM ( SELECT logon_ip
postgres(# FROM logon_log_en
postgres(# WHERE com_id = P_COMID AND operator_no = P_OPEARTORNO
postgres(# ORDER BY last_logon_time DESC)
postgres-# WHERE ROWNUM = 1;
postgres-# EXCEPTION
postgres-# WHEN OTHERS
postgres-# THEN
postgres-# RETURN ('');
postgres-# END;
postgres-# RETURN (output_value);
postgres-# END F_GET_LAST_LOGON_IP;
postgres-# /
ERROR: end label "f_get_last_logon_ip" specified for unlabeled block
LINE 18: END F_GET_LAST_LOGON_IP
^
QUERY: output_value VARCHAR2 (1000);
BEGIN
output_value := '';
BEGIN
SELECT LOGON_IP
INTO output_value
FROM ( SELECT logon_ip
FROM logon_log_en
WHERE com_id = P_COMID AND operator_no = P_OPEARTORNO
ORDER BY last_logon_time DESC)
WHERE ROWNUM = 1;
EXCEPTION
WHEN OTHERS
THEN
RETURN ('');
END;
RETURN (output_value);
END F_GET_LAST_LOGON_IP
postgres=#
The text was updated successfully, but these errors were encountered: