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 accepted queries are added to the system table DESIGN_QUERIES.

Behavior Type

Immutable

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 true, Database Designer returns the following results:

  • Number of accepted queries
  • Number of queries referencing non-design tables
  • Number of unsupported queries
  • Number of illegal queries

Privileges

Read access to the input file, and one of the following:

Errors

Database Designer returns an error in the following cases:

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)

See Also

Running Database Designer Programmatically