HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Remove Type Conversion Hint When Creating PACKAGE/FUNCTION/PROCEDURE

Availability

This feature is available since MogDB 5.0.0.

Introduction

When creating a FUNCTION, PROCEDURE, or FUNCTION/PROCEDURE in a PACKAGE, if the type uses source_type%type, remove the NOTICE log for the type conversion.

Benefits

Enhance MogDB compatibility with Oracle to reduce application migration costs.

Syntax Description

CREATE FUNCTION f_test(input1 source_type%TYPE ....)
$$
...
END;$$

Example

MogDB=# CREATE OR REPLACE FUNCTION f_processed_in_out_plpgsgl2(out out1 t_processed.val%TYPE, out out2 t_processed.val%TYPE, in1 t_processed.val%TYPE)
MogDB-# AS $$
MogDB$# BEGIN
MogDB$#   SELECT val,val2 INTO out1, out2 FROM t_processed WHERE val = in1 LIMIT 1;
MogDB$# END;$$
MogDB-# LANGUAGE plpgsql;
CREATE FUNCTION
Copyright © 2011-2024 www.enmotech.com All rights reserved.