Catalog: Namespaces and Categories¶
pghf.get_category(p_namespace_code text, p_category_code text)¶
Returns one category record by its namespace and category code together.
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
p_namespace_code |
text |
Yes | — | Owning namespace. |
p_category_code |
text |
Yes | — | Category within that namespace. |
Returns: the category record. Raises an error if not found.
pghf.get_namespace(p_namespace_code text)¶
Returns one namespace record by code.
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
p_namespace_code |
text |
Yes | — | Namespace to look up. |
Returns: the namespace record. Raises an error if not found.
pghf.list_categories(p_namespace_code text DEFAULT NULL, p_only_active boolean DEFAULT NULL)¶
Lists category records.
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
p_namespace_code |
text |
No | empty = every namespace | Scope to one namespace. |
p_only_active |
boolean |
No | empty = no filter | true = active only, false = inactive only. |
Returns: zero or more category records, ordered by namespace code then category code.
pghf.list_namespaces(p_only_active boolean DEFAULT NULL)¶
Lists namespace records.
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
p_only_active |
boolean |
No | empty = no filter | true = active only, false = inactive only. |
Returns: zero or more namespace records, ordered by namespace code.
pghf.upsert_category(p_namespace_code text, p_category_code text, p_category_name text, p_is_active boolean DEFAULT NULL)¶
The only way to add, rename, or activate/inactivate a category — a single create-or-update entry point, the same pattern as pghf.upsert_namespace() below.
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
p_namespace_code |
text |
Yes | — | Owning namespace; must already exist. |
p_category_code |
text |
Yes | — | 1–2 uppercase letters/digits. Immutable once created. |
p_category_name |
text |
Yes | — | Display name, max 50 characters. Updated in place if the category already exists. |
p_is_active |
boolean |
No | empty | Empty = leave unchanged on an existing row (active by default on a brand-new one). Pass true/false explicitly to activate/inactivate. |
Returns: text — the full category code (namespace code plus category code). Only a role explicitly granted permission can call this — see The Access Model.
pghf.upsert_namespace(p_namespace_code text, p_namespace_name text, p_is_active boolean DEFAULT NULL)¶
The only way to add, rename, or activate/inactivate a namespace. Inactivating one blocks registering, updating, or adding to a suite any check under it — without touching or moving any existing check, and without removing anything from suites it already belongs to. See Inactivating a Namespace or Category.
| Parameter | Type | Mandatory | Default | Description |
|---|---|---|---|---|
p_namespace_code |
text |
Yes | — | 1–4 uppercase letters/digits. The primary identifier; immutable once created. |
p_namespace_name |
text |
Yes | — | Display name, max 50 characters. Updated in place if the namespace already exists. |
p_is_active |
boolean |
No | empty | Empty = leave unchanged on an existing row (active by default on a brand-new one). Pass true/false explicitly to activate/inactivate. |
Returns: text — the namespace code. Only a role explicitly granted permission can call this.
Continue to Catalog: Checks.