DESIGNER_ADD_DESIGN_QUERIES
Reads and evaluates queries from an input file, and adds the queries that it accepts to the specified design. All accepted queries are assigned a weight of 1 (see DESIGNER_ADD_DESIGN_QUERIES
).
The following requirements apply:
- All queried tables must previously be added to the design with
DESIGNER_ADD_DESIGN_TABLES
. - If the design type is incremental, the Database Designer reads only the first 100 queries in the input file, and ignores all queries beyond that number.
All accepted queries are added to the system table DESIGN_QUERIES
.
Behavior Type
Syntax
DESIGNER_ADD_DESIGN_QUERIES ( 'design‑name', 'input‑file' [, return‑results] )
Parameters
design‑name |
Name of the target design. |
input‑file |
Absolute path to the queries file. |
return‑results |
Boolean, optionally specifies whether to return results of the add operation to standard output. If set to
|
Privileges
Read access to the input file, and one of the following:
- Superuser
- Design creator with all privileges that pertain to the input file queries (see Privileges Required for Common Database Operations).
Errors
Database Designer returns an error in the following cases:
- The query contains illegal syntax.
- The query references:
- External or system tables only
- Local temporary or other non-design tables
DELETE
orUPDATE
query has one or more subqueries.INSERT
query does not include aSELECT
clause.- Database Designer cannot optimize the query.
Examples
The following example adds queries from vmart_queries.sql
to the VMART_DESIGN
design. This file contains nine queries. The statement includes a third argument of true, so Database Designer returns results of the add operation:
=> SELECT DESIGNER_ADD_DESIGN_QUERIES ('VMART_DESIGN', '/tmp/examples/vmart_queries.sql', 'true'); ... DESIGNER_ADD_DESIGN_QUERIES ---------------------------------------------------- Number of accepted queries =9 Number of queries referencing non-design tables =0 Number of unsupported queries =0 Number of illegal queries =0 (1 row)