pg_tle--1.1.1.sql [409:585]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE FUNCTION pgtle.create_shell_type
(
  typenamespace regnamespace,
  typename name
)
RETURNS void
STRICT
AS 'MODULE_PATHNAME', 'pg_tle_create_shell_type'
LANGUAGE C;

CREATE FUNCTION pgtle.create_shell_type_if_not_exists
(
  typenamespace regnamespace,
  typename name
)
RETURNS boolean
STRICT
AS 'MODULE_PATHNAME', 'pg_tle_create_shell_type_if_not_exists'
LANGUAGE C;

CREATE FUNCTION pgtle.create_base_type
(
  typenamespace regnamespace,
  typename name,
  infunc regprocedure,
  outfunc regprocedure,
  internallength int4
)
RETURNS void
STRICT
AS 'MODULE_PATHNAME', 'pg_tle_create_base_type'
LANGUAGE C;

CREATE FUNCTION pgtle.create_base_type_if_not_exists
(
  typenamespace regnamespace,
  typename name,
  infunc regprocedure,
  outfunc regprocedure,
  internallength int4
)
RETURNS boolean
AS $_pgtleie_$
BEGIN
  PERFORM pgtle.create_base_type(typenamespace, typename, infunc, outfunc, internallength);
  RETURN TRUE;
EXCEPTION
  -- only catch the duplicate_object exception, let all other exceptions pass through.
  WHEN duplicate_object THEN
    RETURN FALSE;
END;
$_pgtleie_$
LANGUAGE plpgsql STRICT;

CREATE FUNCTION pgtle.create_operator_func
(
  typenamespace regnamespace,
  typename name,
  opfunc regprocedure
)
RETURNS void
STRICT
AS 'MODULE_PATHNAME', 'pg_tle_create_operator_func'
LANGUAGE C;

CREATE FUNCTION pgtle.create_operator_func_if_not_exists
(
  typenamespace regnamespace,
  typename name,
  opfunc regprocedure
)
RETURNS boolean
AS $_pgtleie_$
BEGIN
  PERFORM pgtle.create_operator_func(typenamespace, typename, opfunc);
  RETURN TRUE;
EXCEPTION
  -- only catch the duplicate_object exception, let all other exceptions pass through.
  WHEN duplicate_object THEN
    RETURN FALSE;
END;
$_pgtleie_$
LANGUAGE plpgsql STRICT;

REVOKE EXECUTE ON FUNCTION pgtle.create_shell_type
(
  typenamespace regnamespace,
  typename name
) FROM PUBLIC;

REVOKE EXECUTE ON FUNCTION pgtle.create_shell_type_if_not_exists
(
  typenamespace regnamespace,
  typename name
) FROM PUBLIC;

REVOKE EXECUTE ON FUNCTION pgtle.create_base_type
(
  typenamespace regnamespace,
  typename name,
  infunc regprocedure,
  outfunc regprocedure,
  internallength int4
) FROM PUBLIC;

REVOKE EXECUTE ON FUNCTION pgtle.create_base_type_if_not_exists
(
  typenamespace regnamespace,
  typename name,
  infunc regprocedure,
  outfunc regprocedure,
  internallength int4
) FROM PUBLIC;

REVOKE EXECUTE ON FUNCTION pgtle.create_operator_func
(
  typenamespace regnamespace,
  typename name,
  opfunc regprocedure
) FROM PUBLIC;

REVOKE EXECUTE ON FUNCTION pgtle.create_operator_func_if_not_exists
(
  typenamespace regnamespace,
  typename name,
  opfunc regprocedure
) FROM PUBLIC;

GRANT EXECUTE ON FUNCTION pgtle.create_shell_type
(
  typenamespace regnamespace,
  typename name
) TO pgtle_admin;

GRANT EXECUTE ON FUNCTION pgtle.create_shell_type_if_not_exists
(
  typenamespace regnamespace,
  typename name
) TO pgtle_admin;

GRANT EXECUTE ON FUNCTION pgtle.create_base_type
(
  typenamespace regnamespace,
  typename name,
  infunc regprocedure,
  outfunc regprocedure,
  internallength int4
) TO pgtle_admin;

GRANT EXECUTE ON FUNCTION pgtle.create_base_type_if_not_exists
(
  typenamespace regnamespace,
  typename name,
  infunc regprocedure,
  outfunc regprocedure,
  internallength int4
) TO pgtle_admin;

GRANT EXECUTE ON FUNCTION pgtle.create_operator_func
(
  typenamespace regnamespace,
  typename name,
  opfunc regprocedure
) TO pgtle_admin;

GRANT EXECUTE ON FUNCTION pgtle.create_operator_func_if_not_exists
(
  typenamespace regnamespace,
  typename name,
  opfunc regprocedure
) TO pgtle_admin;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



