-- Generated by BladeSmith 4.00.TC2  DO NOT MODIFY. --

execute procedure ifx_allow_newline('t');

insert into sysbldobjects
	(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
	    create_can_fail, drop_sql, drop_can_fail)
values
(
	"%SYSBLDNAME%", 0, "regex_trace_class",
	"%SYSBLDUSER%", 0,
	"insert into systraceclasses (name) values ('ifxregex');
",
	"f",
	"delete from systraceclasses where name='ifxregex';
",
	"f"
);

insert into sysbldobjects
	(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
	    create_can_fail, drop_sql, drop_can_fail)
values
(
	"%SYSBLDNAME%", 0, "regex_trace_messages",
	"%SYSBLDUSER%", 0,
	"
insert into systracemsgs (name, locale, message)
values
('regex_any_text', 'en_us.8859-1',
'%FUNCNAME%: %MESSAGE%'
);

insert into systracemsgs (name, locale, message)
values
('regex_any_text', 'en_us.1252',
'%FUNCNAME%: %MESSAGE%'
);
",
	"f",
	"
delete from systracemsgs where name='regex_any_text';
",
	"f"
);

insert into sysbldobjects
	(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
	    create_can_fail, drop_sql, drop_can_fail)
values
(
	"%SYSBLDNAME%", 5, "regex_functions",
	"%SYSBLDUSER%", 0,
	"
create function regex_match (lvarchar,lvarchar,integer default null,integer default null)
returns boolean
with (parallelizable, handlesnulls, not variant, percall_cost=1000)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_match_char)' language c;

create function regex_extract (lvarchar,lvarchar,integer default null,integer default null,integer default null)
returns lvarchar
with (iterator, parallelizable, handlesnulls, not variant)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_extract_char)' language c;

create function regex_replace (lvarchar,lvarchar,lvarchar,integer default null,integer default null,integer default null)
returns lvarchar
with (parallelizable, handlesnulls, not variant, percall_cost=1000)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_replace_char)' language c;

create function regex_split (lvarchar,lvarchar,integer default null,integer default null,integer default null)
returns lvarchar
with (iterator, parallelizable, handlesnulls, not variant)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_split_char)' language c;

create function regex_match (clob,lvarchar,integer default null,integer default null)
returns boolean
with (parallelizable, handlesnulls, not variant, percall_cost=1000)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_match_clob)' language c;

create function regex_extract (clob,lvarchar,integer default null,integer default null,integer default null)
returns lvarchar
with (iterator, parallelizable, handlesnulls, not variant)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_extract_clob)' language c;

create function regex_replace (clob,lvarchar,lvarchar,integer default null,integer default null,integer default null)
returns clob
with (parallelizable, handlesnulls, not variant, percall_cost=1000)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_replace_clob)' language c;

create function regex_split (clob,lvarchar,integer default null,integer default null,integer default null)
returns lvarchar
with (iterator, parallelizable, handlesnulls, not variant)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_split_clob)' language c;

create procedure regex_set_trace (lvarchar,integer)
with (handlesnulls)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_set_trace)' language c;

create function regex_release ()
returns lvarchar
with (handlesnulls)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_release)' language c;

create function regex_copts (lvarchar)
returns integer
with (handlesnulls)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_copts)' language c;

create function regex_eopts (lvarchar)
returns integer
with (handlesnulls)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_eopts)' language c;

create function regex_htr (lvarchar)
returns lvarchar
with (handlesnulls)
external name '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_htr_sql)' language c;

grant execute on function regex_match (lvarchar,lvarchar,integer,integer) to public;
grant execute on function regex_extract (lvarchar,lvarchar,integer,integer,integer) to public;
grant execute on function regex_replace (lvarchar,lvarchar,lvarchar,integer,integer,integer) to public;
grant execute on function regex_split (lvarchar,lvarchar,integer,integer,integer) to public;

grant execute on function regex_match (clob,lvarchar,integer,integer) to public;
grant execute on function regex_extract (clob,lvarchar,integer,integer,integer) to public;
grant execute on function regex_replace (clob,lvarchar,lvarchar,integer,integer,integer) to public;
grant execute on function regex_split (clob,lvarchar,integer,integer,integer) to public;

grant execute on procedure regex_set_trace (lvarchar,integer) to public;
grant execute on function regex_release () to public;
grant execute on function regex_copts (lvarchar) to public;
grant execute on function regex_eopts (lvarchar) to public;

grant execute on function regex_htr (lvarchar) to public;
",
	"f",
	"
drop function regex_match (lvarchar,lvarchar,integer,integer);
drop function regex_extract (lvarchar,lvarchar,integer,integer,integer);
drop function regex_replace (lvarchar,lvarchar,lvarchar,integer,integer,integer);
drop function regex_split (lvarchar,lvarchar,integer,integer,integer);

drop function regex_match (clob,lvarchar,integer,integer);
drop function regex_extract (clob,lvarchar,integer,integer,integer);
drop function regex_replace (clob,lvarchar,lvarchar,integer,integer,integer);
drop function regex_split (clob,lvarchar,integer,integer,integer);

drop procedure regex_set_trace (lvarchar,integer);
drop function regex_release ();

drop function regex_copts (lvarchar);
drop function regex_eopts (lvarchar);

drop function regex_htr (lvarchar);

",
	"f"
);

insert into sysbldobjects
	(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
	    create_can_fail, drop_sql, drop_can_fail)
values
(
	"%SYSBLDNAME%", 181, "regex_external_names",
	"%SYSBLDUSER%", 0,
	"
alter function regex_match (lvarchar,lvarchar,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_match_char)');
alter function regex_extract (lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_extract_char)');
alter function regex_replace (lvarchar,lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_replace_char)');
alter function regex_split (lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_split_char)');

alter function regex_match (clob,lvarchar,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_match_clob)');
alter function regex_extract (clob,lvarchar,integer,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_extract_clob)');
alter function regex_replace (clob,lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_replace_clob)');
alter function regex_split (clob,lvarchar,integer,integer,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_split_clob)');

alter procedure regex_set_trace (lvarchar,integer)
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_set_trace)');
alter function regex_release ()
	with (Modify External Name = '$INFORMIXDIR/extend/%SYSBLDDIR%/ifxregex.bld(ifxregex_release)');
",
	"f",
	"
alter function regex_match (lvarchar,lvarchar,integer,integer)
	with (Modify External Name = 'ifxregex_match_char');
alter function regex_extract (lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = 'ifxregex_extract_char');
alter function regex_replace (lvarchar,lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = 'ifxregex_replace_char');
alter function regex_split (lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = 'ifxregex_split_char');

alter function regex_match (clob,lvarchar,integer,integer)
	with (Modify External Name = 'ifxregex_match_clob');
alter function regex_extract (clob,lvarchar,integer,integer,integer)
	with (Modify External Name = 'ifxregex_extract_clob');
alter function regex_replace (clob,lvarchar,lvarchar,integer,integer,integer)
	with (Modify External Name = 'ifxregex_replace_clob');
alter function regex_split (clob,lvarchar,integer,integer,integer)
	with (Modify External Name = 'ifxregex_split_clob');

alter procedure regex_set_trace (lvarchar,integer)
	with (Modify External Name = 'ifxregex_set_trace');
alter function regex_release ()
	with (Modify External Name = 'ifxregex_release');
",
	"f"
);

insert into sysbldobjdepends
(
	bld_id,
	obj_kind,
	obj_signature,
	obj_owner,
	need_obj_kind,
	need_obj_signature,
	need_obj_owner)
	values
(
	"%SYSBLDNAME%",
	181, "regex_external_names",
	"%SYSBLDUSER%",
	5, "regex_functions",
	"%SYSBLDUSER%"
);

insert into sysbldobjects
	(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
	    create_can_fail, drop_sql, drop_can_fail)
values
(
	"%SYSBLDNAME%", 0, "sysbldregistered",
	"%SYSBLDUSER%", 0,
	"insert into sysbldregistered
	(bld_id)
values
(
	""%SYSBLDNAME%""
);

",
	"f",
	"delete from sysbldregistered
	where bld_id = ""%SYSBLDNAME%"";

",
	"f"
);

