pddefrev (Generate definition SQL)
Function
The pddefrev command generates a definition SQL for tables, indexes, view tables, alias tables, stored procedures, and triggers defined in the HiRDB system.
The generated definition SQL can be used as an input to the database definition utility. This command generates the definition SQL by starting the dictionary import/export utility (pdexp) internally.
Executor
User with DBA privilege
Format
pddefrev -f control-statements-filename
-o definition-SQL-output-filename
[-w work-directory-name]
Options
Specifies the name of the control statements file that contains the tables and stored procedures for which the definition SQL is to be generated. For details about the contents of the control statements file, see Chapter 9. Dictionary Import/Export Utility (pdexp).
Specifies the absolute pathname of the file to which the generated definition SQL is to be output. If the specified file already exists, HiRDB writes the generated definition SQL by overwriting the existing information; if the specified file does not already exist, HiRDB creates it.
Specifies the absolute pathname of the directory to be used for temporary storage of the export file that will be created internally by the pddefrev command in order to export the dictionary. If this option is omitted, /tmp is assumed.
The following is the name of the export file that is created:
pddefrev.exp.HHMMSS
The local time is set in HHMMSS.
Rules
Notes
Type | Index definition | Comment definition | Definition SQL to be generated |
---|---|---|---|
Base table | Defined | Defined | CREATE TABLE CREATE INDEX COMMENT |
Not defined | CREATE TABLE CREATE INDEX | ||
Not defined | Defined | CREATE TABLE COMMENT | |
Not defined | CREATE TABLE | ||
View table | ![]() | Defined | CREATE VIEW COMMENT |
Not defined | CREATE VIEW | ||
Alias table | ![]() | ![]() | CREATE ALIAS |
Stored procedure | ![]() | ![]() | CREATE PROCEDURE |
Trigger | ![]() | ![]() | CREATE TRIGGER |