CREATEPIPE¶
说明¶
此函数用于创建公有或私有管道
返回值¶
创建成功返回0,失败会报错。
注解
创建管道时,管道名称、管道最大长度和私有管道标志参数传入NULL会报错。
私有管道只有创建者或管理员访问。
创建的管道只能通过调用REMOVEPIPE或关闭数据库实例删除。
CREATEPIPE函数提供对DBMS.CREATE_PIPE方法的实现,该方法的详细说明请参照 CREATE_PIPE 章节。
示例¶
-- 清理环境
drop procedure mycreatepipe cascade;
select removepipe('mypipe');
REMOVEPIPE(int) |
---------------------
0 |
总数目:1
-- 创建管道程序
create procedure mycreatepipe() is
declare
flag int;
begin
flag := createpipe('mypipe', 8192, false);
if flag = 0 then
dbms_output.put_line('pipe create success');
else
dbms_output.put_line('pipe create fail');
end if;
end;
/
exec mycreatepipe();
select removepipe('mypipe');
REMOVEPIPE(int) |
---------------------
0 |
总数目:1
drop procedure mycreatepipe;