Goldilocks Function/Procedure script 보는 법
/ddl_procedure [function name | procedure name]
select *from user_source where name like [function name | procedure name]
예시
select *from user_source where name like '%INET%'
15:55:35 gSQL> \\
SCHEMA_NAME NAME TYPE LINE TEXT ORIGIN_CON_ID
----------- --------- -------- ---- -------------------------------------------------------------------------------------- -------------
PUBLIC INET_ATON FUNCTION null FUNCTION "PUBLIC"."INET_ATON" (ip VARCHAR(15)) 0
RETURN INT
IS
result INT DEFAULT 0;
dot_pos1 INT;
dot_pos2 INT;
dot_pos3 INT;
BEGIN
dot_pos1 := INSTR(ip, '.');
dot_pos2 := INSTR(ip, '.', dot_pos1 + 1);
dot_pos3 := INSTR(ip, '.', dot_pos2 + 1);
result := (SUBSTRING(ip, 1, dot_pos1 - 1) * 256 * 256 * 256) +
(SUBSTRING(ip, dot_pos1 + 1, dot_pos2 - dot_pos1 - 1) * 256 * 256) +
(SUBSTRING(ip, dot_pos2 + 1, dot_pos3 - dot_pos2 - 1) * 256) +
SUBSTRING(ip, dot_pos3 + 1);
RETURN result;
END;
1 row selected.
Elapsed time: 48.52100 ms
function 및 package 생성 쿼리를 볼수 있다
'DBMS > Goldilocks' 카테고리의 다른 글
[Goldilocks] inet_aton workaround (0) | 2024.02.21 |
---|