Scripts and Script Arguments

The glossary script file (e.g., pg_glossary.sql) contains the following four scripts that are defined with execsql’s SCRIPT metacommand:

  • init_glossary
  • add_glossary_table
  • add_glossary_item
  • add_glossary_list

The init_glossary script should be called first; the other scripts should be called as necessary for each application.

The purpose of each script, and the arguments that each expects, are described in the following sections.


The script identifies the master glossary table to use and creates the custom glossary table and the glossary view. It also creates several execsql substitution variables that are used by the other scripts.

Required Input Parameters

 The execsql alias, established with the CONNECT metacommand, for the database containing the master glossary table.
glossary_table:The name of the master glossary table.
name_col:The name of the column in the master glossary table that contains the term being defined.
def_col:The name of the column in the master glossary table that contains the term’s definition.

Optional Input Parameters

def_url:The URL of a page that provides additional information about the term.


This script adds columns of the specified table or view to the custom glossary, if those columns are defined in the master glossary. If the table contains columns that are not defined in the master glossary, those column names will not be added.

Required Input Parameters

Postgres and SQL Server

schema:The schema containing the table or view. If the table or view is a temporary object, the schema should be specified as an empty string.
table:The name of the table or view.


MariaDB/MySQL do not support schemas within a database, so the schema argument cannot be used. The table should be a permanent table, not a temporary table, because these DBMSs do not include temporary tables in the information_schema tables.

table:The name of the table or view.


This script adds a specifice term and definition to the custom glossary. This is intended to be used for terms that do not appear in the master glossary table or that need a custom definition.

Required Input Parameters

item:The term to be defined.
definition:The defintion of the term.


This script adds to the custom glossary one or more specific terms that are present in the master glossary table. The terms to be added are specified in a single comma-delimited string. If any terms are specified that are not present in the master glossary, they will not be added to the custom glossary.

Required Input Parameters

column_list:A string containing a comma-delimited list of column names (or other terms) to be added to the custom glossary.