This example shows a valid case of SHOW CONSTRAINT for a row-level security constraint.
The constraint is defined using the following row-level security constraint UDF.
CREATE FUNCTION SYSLIB.add_func ( CURRENT_SESSION SMALLINT) RETURNS SMALLINT LANGUAGE C NO SQL PARAMETER STYLE TD_GENERAL EXTERNAL NAME 'CS!add_func!/home/xiaoy/test/showtab/constraint/ add_func.c';
The constraint is defined as follows.
CREATE CONSTRAINT c1 SMALLINT, NOT NULL, VALUES (a:1), INSERT SYSLIB.add_func;
A SHOW CONSTRAINT request made for row-level security constraint c1 returns the DDL for its definition as follows.
SHOW CONSTRAINT c1; *** Text of DDL statement returned. *** Total elapsed time was 1 second. ------------------------------------------------------------- CREATE CONSTRAINT c1 SMALLINT, NOT NULL, VALUES (a:1), INSERT SYSLIB.add_func;