| Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_METADATA , 3 of 11
SET_FILTER specifies restrictions on the objects to be retrieved, for example, the object name or schema.
PROCEDURE set_filter (handle IN NUMBER, name IN VARCHAR2, value IN VARCHAR2); PROCEDURE set_filter (handle IN NUMBER, name IN VARCHAR2, value IN BOOLEAN DEFAULT TRUE);
| Parameter | Description |
|---|---|
handle |
The handle returned from |
name |
The name of the filter. For each filter, Table 28-5 lists the |
value |
The value of the filter. |
| Object Type | Name | Datatype | Meaning |
|---|---|---|---|
|
|
|
text |
Objects with this exact name are selected. |
|
|
text |
The filter value is the right-hand side of a SQL comparison, i.e., a SQL comparison operator (=,!=, etc.) and the value compared against. The value must contain parentheses and quotation marks where appropriate. In particular, two single quotes (not a double quote) are needed to represent an apostrophe. For example:
The filter value is combined with the object attribute corresponding to the object name to produce a
By default, all named objects of |
|
|
|
|
text |
Objects in this schema are selected. |
|
|
text |
The filter value is the right-hand side of a SQL comparison. The filter value is combined with the object attribute corresponding to the object schema to produce a
- if - otherwise, objects in the current schema are selected. See "Security" . |
|
|
TYPE |
|
Boolean |
If |
|
|
Boolean |
If |
|
|
TABLE |
|
text |
Tables in this tablespace (or having this as their default tablespace) are selected. |
|
|
text |
The filter value is the right-hand side of a SQL comparison. The filter value is combined with the object attribute corresponding to the object tablespace or default tablespace to produce a |
|
|
INDEX, OBJECT_GRANT, TRIGGER |
|
text |
Indexes, triggers, or privileges are selected that are defined or granted on objects with this name. Specify |
|
|
text |
Indexes, triggers, or privileges are selected that are defined or granted on objects in this schema. If |
|
|
INDEX, TRIGGER |
|
Boolean |
If |
|
OBJECT_GRANT, SYSTEM_GRANT |
|
text |
Privileges are selected that are granted to this user or role. Specify |
|
OBJECT_GRANT |
|
text |
Privileges are selected that are granted by this user. |
|
SYNONYM |
|
text |
A synonym name longer than 30 characters. Synonyms with this exact name are selected. If the synonym name is 30 characters or less, the |
|
|
text |
The filter value is the right-hand side of a SQL comparison. The filter value is combined with the object attribute corresponding to the long name of the object to produce a |
|
|
All objects |
|
text |
The text of a |
INVALID_ARGVAL. A NULL or invalid value was supplied for an input parameter. The error message text identifies the parameter.
INVALID_OPERATION. SET_FILTER was called after the first call to FETCH_xxx for the OPEN context. After the first call to FETCH_xxx is made, no further calls to SET_FILTER for the current OPEN context are permitted.
INCONSISTENT_ARGS. The filter name is not valid for the object type associated with the OPEN context, or the filter value is the wrong datatype.
With SET_FILTER, you can specify the schema of objects to be retrieved, but security considerations may override this specification. If the caller is SYS or has SELECT_CATALOG_ROLE, then any object can be retrieved; otherwise, only the following can be retrieved:
PUBLIC
PUBLIC).
If you request objects that you are not privileged to retrieve, no exception is raised; the object is not retrieved, as if it did not exist.
These rules apply to dependent objects such as triggers, grants, and indexes.
BASE_OBJECT_NAME is specified as a filter, BASE_OBJECT_SCHEMA defaults to the current schema:
dbms_metadata.set_filter(h,'BASE_OBJECT_NAME','EMP');
BASE_OBJECT_SCHEMA if specified; otherwise it defaults to the current schema. For example, to see all indexes in SCOTT that are defined on SCOTT.EMP, the filters are:
dbms_metadata.set_filter(h,'BASE_OBJECT_NAME','EMP'); dbms_metadata.set_filter(h,'BASE_OBJECT_SCHEMA','SCOTT');
To see indexes in other schemas:
dbms_metadata.set_filter(h,'SCHEMA_EXPR','LIKE ''%''');
Some indexes and triggers are system generated (such as indexes used to enforce unique constraints). Set the SYSTEM_GENERATED filter to FALSE so that you do not retrieve them.
|
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|