diff --git a/docs/en_US/check_dialog.rst b/docs/en_US/check_dialog.rst new file mode 100644 index 000000000..930d319f5 --- /dev/null +++ b/docs/en_US/check_dialog.rst @@ -0,0 +1,45 @@ +.. _check_dialog: + +**************** +The Check Dialog +**************** + +Use the *Check* dialog to define or modify a check constraint. A check constraint specifies an expression that produces a Boolean result that new or updated rows must satisfy for an insert or update operation to succeed. + +The *Check* dialog organizes the development of a check constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/check_general.png + +Use the fields in the *General* tab to identify the check constraint: + +* Use the *Name* field to add a descriptive name for the check constraint. The name will be displayed in the *pgAdmin* tree control. With PostgreSQL 9.5 forward, when a table has multiple check constraints, they will be tested for each row in alphabetical order by name and after NOT NULL constraints. + +Click the *Definition* tab to continue. + +.. image:: images/check_definition.png + +Use the fields in the *Definition* tab to define the check constraint: + +* Provide the expression that a row must satisfy in the *Check* field. +* Move the *No Inherit?* switch to the *Yes* position to specify this constraint is automatically inherited by a table's children. The default is *No*. +* Move the *Don't validate?* switch to the *No* position to skip validation of existing data; the constraint may not hold for all rows in the table. The default is *Yes*. + +Click the *SQL* tab to continue. + +Your entries in the *Check* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Check* dialog: + +.. image:: images/check_sql.png + +The example shown demonstrates creating a check constraint named *check_price* on the *price* column of the *products* table. The constraint confirms that any values added to the column are greater than 0. + + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/collation_dialog.rst b/docs/en_US/collation_dialog.rst index f863c5fbe..5f37aeff8 100644 --- a/docs/en_US/collation_dialog.rst +++ b/docs/en_US/collation_dialog.rst @@ -1,4 +1,4 @@ -.. _collation: +.. _collation_dialog: ******************** The Collation Dialog @@ -43,7 +43,9 @@ The following is an example of the sql command generated by user selections in t The example shown demonstrates creating a collation named *french* that uses the rules specified for the locale, *fr_FR.utf8. The collation is owned by *enterprisedb*. * Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. For more information about setting a locale, see Chapter 22.1 Locale Support of the PostgreSQL core documentation: + http://www.postgresql.org/docs/9.5/static/locale.html + * Click the *Save* button to save work. * Click the *Cancel* button to exit without saving work. * Click the *Reset* button to restore configuration parameters. diff --git a/docs/en_US/column_dialog.rst b/docs/en_US/column_dialog.rst new file mode 100644 index 000000000..61b9af7d0 --- /dev/null +++ b/docs/en_US/column_dialog.rst @@ -0,0 +1,73 @@ +.. _column_dialog: + +***************** +The Column Dialog +***************** + +Use the *Column* dialog to add a column to an existing table or modify a column definition. + +The *Column* dialog organizes the development of a column through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/column_general.png + +Use the fields in the *General* tab to identify the column: + +* Use the *Name* field to add a descriptive name for the column. The name will be displayed in the *pgAdmin* tree control. This field is required. +* Store notes about the column in the *Comment* field. + +Click the *Definition* tab to continue. + +.. image:: images/column_definition.png + +Use the fields in the *Definition* tab to add parameters for the column. (Fields are disabled if inapplicable.) + +* Use the drop-down listbox next to *Data Type* to select a data type for the column. For more information on the data types that are supported by PostgreSQL, refer to Chapter 8 of the Postgres core documentation. This field is required. +* Use the *Scale* field to specify scale of the value (the number of digits to the right of the decimal point). +* Use the *Length/Precision* field to specify the maximum number of significant digits in a numeric value, or the maximum number of characters in a text value. +* Use the drop-down listbox next to *Collation* to apply a collation setting to the column. +* Use the *Default* field to specify a default data value. +* Check the *Not Null* checkbox to specify the column may not contain null values. + +Click the *Security* tab to continue. + +.. image:: images/column_security.png + +Use the *Security* tab to assign attributes and define security labels. + +Use the *Variables* panel to specify the number of distinct values that may be present in the column; this value overrides estimates made by the ANALYZE command. Click *Add* to add an attribute: + +* Select the name of the variable from the drop-down listbox in the *Name* field. + + * Select *n_distinct* to specify the number of distinct values for the column. + * Select *n_distinct_inherited* to specify the number of distinct values for the table and its children. + +* Specify the number of distinct values in the *Value* field. For more information, see the documentation for `ALTER TABLE `_. + +To discard an attribute, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup. + +Use the *Security Labels* panel to define security labels applied to the column. Click *Add* to add each security label selection: + +* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation. +* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them. + +Click *Add* to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup. + +Click the *SQL* tab to continue. + +Your entries in the *Column* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Column* dialog: + +.. image:: images/column_sql.png + +The example shown demonstrates creating a column named *territory* in the table named *distributors*. + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + + diff --git a/docs/en_US/exclusion_constraint_dialog.rst b/docs/en_US/exclusion_constraint_dialog.rst new file mode 100644 index 000000000..e79ae4fe7 --- /dev/null +++ b/docs/en_US/exclusion_constraint_dialog.rst @@ -0,0 +1,64 @@ +.. _exclusion_constraint: + +******************************* +The Exclusion constraint Dialog +******************************* + +Use the *Exclusion constraint* dialog to define or modify the behavior of an exclusion constraint. An exclusion constraint guarantees that if any two rows are compared on the specified column or expression (using the specified operator), at least one of the operator comparisons will return false or null. + +The *Exclusion constraint* dialog organizes the development of an exclusion constraint through the following dialog tabs: *General*, *Definition*, and *Columns*. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/exclusion_constraint_general.png + +Use the fields in the *General* tab to identify the exclusion constraint: + +* Use the *Name* field to provide a descriptive name for the exclusion constraint. The name will be displayed in the *pgAdmin* tree control. + +Click the *Definition* tab to continue. + +.. image:: images/exclusion_constraint_definition.png + +Use the fields in the *Definition* tab to define the exclusion constraint: + +* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index associated with the exclude constraint will reside. +* Use the drop-down listbox next to *Access method* to specify the type of index that will be used when implementing the exclusion constraint: + + * Select *gist* to specify a GiST index (the default). + * Select *spgist* to specify a space-partitioned GiST index. + * Select *btree* to specify a B-tree index. + * Select *hash* to specify a hash index. + +* Use the *Fill Factor* field to specify a fill factor for the table and associated index. The fill factor is a percentage between 10 and 100. 100 (complete packing) is the default. +* Move the *Deferrable?* switch to the *Yes* position to specify that the timing of the constraint is deferrable, and can be postponed until the end of the statement. The default is *No*. +* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*. +* Use the *Constraint* field to provide a condition that a row must satisfy to be included in the table. + +Click the *Columns* tab to continue. + +.. image:: images/exclusion_constraint_columns.png + +Use the fields in the *Columns* tab to to specify the column(s) to which the constraint applies. Use the drop-down listbox next to *Column* to select a column and click *Add* to provide details of the action on the column: + +* The *Column* field is populated with the selection made in the *Column* drop-down listbox. +* If applicable, use the drop-down listbox in the *Operator class* to specify the operator class that will be used by the index for the column. +* Move the *DESC* switch to *DESC* to specify a descending sort order. The default is *ASC* which specifies an ascending sort order. +* Use the drop-down list next to *Operator* to specify a comparison or conditional operator. + +Click the *SQL* tab to continue. + +Your entries in the *Exclusion Constraint* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Exclusion Constraint* dialog: + +.. image:: images/exclusion_constraint_sql.png + +The example shown demonstrates creating an exclusion constraint named *exclude_department* that restricts additions to the dept table to those additions that are not equal to the value of the *deptno* column. The constraint uses a btree index. + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/foreign_key_dialog.rst b/docs/en_US/foreign_key_dialog.rst new file mode 100644 index 000000000..7b4a1cc1c --- /dev/null +++ b/docs/en_US/foreign_key_dialog.rst @@ -0,0 +1,91 @@ +.. _foreign_key_dialog: + +********************** +The Foreign key Dialog +********************** + +Use the *Foreign key* dialog to specify the behavior of a foreign key. A foreign key constraint maintains referential integrity between two tables. A foreign key constraint cannot be defined between a temporary table and a permanent table. + +The *Foreign key* dialog organizes the development of a foreign key constraint through the following dialog tabs: *General*, *Definition*, *Columns*, and *Action*. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/foreign_key_general.png + +Use the fields in the *General* tab to identify the foreign key constraint: + +* Use the *Name* field to add a descriptive name for the foreign key constraint. The name will be displayed in the *pgAdmin* tree control. + +Click the *Definition* tab to continue. + +.. image:: images/foreign_key_definition.png + +Use the fields in the *Definition* tab to define the foreign key constraint: + +* Move the *Deferrable?* switch to the *Yes* position to specify the timing of the constraint is deferrable and can be postponed until the end of the statement. The default is *No*. +* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*. +* Move the *Match type* switch specify the type of matching that is enforced by the constraint: + + * Select *Full* to indicate that all columns of a multicolumn foreign key must be null if any column is null; if all columns are null, the row is not required to have a match in the referenced table. + * Select *Simple* to specify that a single foreign key column may be null; if any column is null, the row is not required to have a match in the referenced table. + +* Move the *Validated* switch to the *Yes* position to instruct the server to validate the existing table content (against a foreign key or check constraint) when you save modifications to this dialog. +* Move the *Auto FK Index* switch to the *No* position to disable the automatic index feature. +* The field next to *Covering Index* generates the name of an index if the *Auto FK Index* switch is in the *Yes* position; or, this field is disabled. + +Click the *Columns* tab to continue. + +.. image:: images/foreign_key_columns.png + +Use the fields in the *Columns* tab to specify one or more reference column(s). A Foreign Key constraint requires that one or more columns of a table must only contain values that match values in the referenced column(s) of a row of a referenced table: + +* Use the drop-down listbox next to *Local column* to specify the column in the current table that will be compared to the foreign table. +* Use the drop-down listbox next to *References* to specify the name of the table in which the comparison column(s) resides. +* Use the drop-down listbox next to *Referencing* to specify a column in the foreign table. + +Click *Add* to add a column to the list; repeat the steps above and click *Add* to add additional columns. To discard an entry, click the trash icon to the left of the entry and confirm deletion in the *Delete Row* popup. + +Click the *Action* tab to continue. + +.. image:: images/foreign_key_action.png + +Use the drop-down listboxes on the *Action* tab to specify behavior related to the foreign key constraint that will be performed when data within the table is updated or deleted: + +* Use the drop-down listbox next to *On update* to select an action that will be performed when data in the table is updated. +* Use the drop-down listbox next to *On delete* to select an action that will be performed when data in the table is deleted. + +The supported actions are: + ++-------------+------------------------------------------------------------------------------------------------------------+ +| NO ACTION | Produce an error indicating that the deletion or update will create a foreign key constraint violation. | +| | If the constraint is deferred, this error will be produced at constraint check time if any referencing | +| | rows still exist. This is the default. | ++-------------+------------------------------------------------------------------------------------------------------------+ +| RESTRICT | Throw an error indicating that the deletion or update would create a foreign key constraint violation. | +| | This is the same as NO ACTION except that the check is not deferrable. | ++-------------+------------------------------------------------------------------------------------------------------------+ +| CASCADE | Delete any rows referencing the deleted row, or update the values of the referencing column(s) to the new | +| | values of the referenced columns, respectively. | ++-------------+------------------------------------------------------------------------------------------------------------+ +| SET NULL | Set the referencing column(s) to null. | ++-------------+------------------------------------------------------------------------------------------------------------+ +| SET DEFAULT | Set the referencing column(s) to their default values. There must be a row in the referenced table | +| | that matches the default values (if they are not null), or the operation will fail. | ++-------------+------------------------------------------------------------------------------------------------------------+ + +Click the *SQL* tab to continue. + +Your entries in the *Foreign key* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Foreign key* dialog: + +.. image:: images/foreign_key_sql.png + +The example shown demonstrates creating a foreign key constraint named *territory_fkey* that matches values in the *distributors* *territory* column with those of the *sales_territories* *region* column. + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/function_dialog.rst b/docs/en_US/function_dialog.rst index a95908f2c..99cc92b3c 100644 --- a/docs/en_US/function_dialog.rst +++ b/docs/en_US/function_dialog.rst @@ -1,4 +1,4 @@ -.. _function: +.. _function_dialog: ******************* The Function Dialog @@ -34,14 +34,18 @@ Click the *Options* tab to continue. Use the fields in the *Options* tab to describe or modify the action of the function: * Use the drop-down listbox next to *Volatility* to select one of the following. *VOLATILE* is the default value. - *VOLATILE* indicates that the function value can change even within a single table scan, so no optimizations can be made. - *STABLE* indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values. - *IMMUTABLE* indicates that the function cannot modify the database and always returns the same result when given the same argument values. + + * *VOLATILE* indicates that the function value can change even within a single table scan, so no optimizations can be made. + * *STABLE* indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values. + * *IMMUTABLE* indicates that the function cannot modify the database and always returns the same result when given the same argument values. + * Move the *Returns a Set?* switch to indicate if the function returns a set that includes multiple rows. The default is *No*. * Move the *Strict?* switch to indicate if the function always returns NULL whenever any of its arguments are NULL. If *Yes*, the function is not executed when there are NULL arguments; instead a NULL result is assumed automatically. The default is *No*. * Move the *Security of definer?* switch to specify that the function is to be executed with the privileges of the user that created it. The default is *No*. * Move the *Window?* switch to indicate that the function is a window function rather than a plain function. The default is *No*. This is currently only useful for functions written in C. The WINDOW attribute cannot be changed when replacing an existing function definition. For more information about the CREATE FUNCTION command, see the PostgreSQL core documentation available at: + http://www.postgresql.org/docs/9.5/static/functions-window.html + * Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the function, in units of cpu_operator_cost. If the function returns a set, this is the cost per returned row. * Use the *Estimated rows* field to specify a positive number giving the estimated number of rows that the query planner should expect the function to return. This is only allowed when the function is declared to return a set. The default assumption is 1000 rows. * Move the *Leak proof?* switch to indicate whether the function has side effects. The default is *No*. This option can only be set by the superuser. diff --git a/docs/en_US/grant_wizard.rst b/docs/en_US/grant_wizard.rst new file mode 100644 index 000000000..f8c7c7d1a --- /dev/null +++ b/docs/en_US/grant_wizard.rst @@ -0,0 +1,55 @@ +.. _grant_wizard: + +************ +Grant Wizard +************ + +The *Grant Wizard* tool is a graphical interface that allows you to manage the privileges of one or more database objects in a point-and-click environment. A search box, dropdown lists, and checkboxes facilitate quick selections of database objects, roles and privileges. + +The wizard organizes privilege management through a sequence of windows: *Object Selection (step 1 of 3)*, *Privileges Selection (step 2 of 3)* and *Final (Review Selection) (step 3 of 3)*. The *Final (Review Selection)* window displays the SQL code generated by wizard selections. + +To launch the *Grant Wizard* tool, select a database object in the *pgAdmin* tree control, then navigate through *Tools* on the menu bar to click on the *Grant Wizard* option. + +.. image:: images/grant_wizard_step1.png + +Use the fields in the *Object Selection (step 1 of 3)* window to select the object or objects on which you are modifying privileges. Use the *Search by object type or name* field to locate a database object, or use the scrollbar to scroll through the list of all accessible objects. + +* Each row in the table lists object identifiers; check the checkbox in the left column to include an object as a target of the Grant Wizard. The table displays: + + * The object type in the *Object Type* field + * The schema in which the object resides in the *Schema* field + * The object name in the *Name* field. + +Click the *Next* button to continue, or the *Cancel* button to close the wizard without modifying privileges. + +.. image:: images/grant_wizard_step2.png + +Use the fields in the *Privileges Selection (step 2 of 3)* window to grant privileges. If you grant a privilege WITH GRANT OPTION, the Grantee will have the right to grant privileges on the object to others. If WITH GRANT OPTION is subsequently revoked, any role who received access to that object from that Grantee (directly or through a chain of grants) will lose thier privileges on the object. + +* Click *Add* to assign a set of privileges. +* Select the name of the role from the drop-down listbox in the *Grantee* field. +* Click inside the *Privileges* field. Check the boxes to the left of one or more privileges to grant the selected privileges to the specified user. If privileges have previously been granted on a database object, unchecking a privilege for a group or user will result in revoking that privilege. +* If enabled, select the name of the role from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the database. +* Click *Add* to assign a set of privileges to another role; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* dialog. + +For more information about granting privileges on database objects, see the `PostgreSQL core documentation `_. + +Click the *Next* button to continue, the *Back* button to select or deselect additional database objects, or the *Cancel* button to close the wizard without modifying privileges. + +Your entries in the *Grant Wizard* tool generate a SQL command; you can review the command in the *Final (Review Selection) (step 3 of 3)* window (see an example below). + +**Example** + +The following is an example of the sql command generated by user selections in the *Grant Wizard* tool: + +.. image:: images/grant_wizard_step3.png + +The commands displayed assign a role named *Bob* *INSERT* and *UPDATE* privileges *WITH GRANT OPTION* on the *sales_meetings* and the *sales_territories* tables. + + +* Click the *Back* button to select or deselect additional database objects, roles and privileges. +* Click the *Cancel* button to exit without saving work. +* Click the *Finish* button to save selections and exit the wizard. + + + diff --git a/docs/en_US/images/check_definition.png b/docs/en_US/images/check_definition.png new file mode 100644 index 000000000..ff04bc2c0 Binary files /dev/null and b/docs/en_US/images/check_definition.png differ diff --git a/docs/en_US/images/check_general.png b/docs/en_US/images/check_general.png new file mode 100644 index 000000000..2df0e2939 Binary files /dev/null and b/docs/en_US/images/check_general.png differ diff --git a/docs/en_US/images/check_sql.png b/docs/en_US/images/check_sql.png new file mode 100644 index 000000000..aaef7cfed Binary files /dev/null and b/docs/en_US/images/check_sql.png differ diff --git a/docs/en_US/images/column_definition.png b/docs/en_US/images/column_definition.png new file mode 100644 index 000000000..527c36b68 Binary files /dev/null and b/docs/en_US/images/column_definition.png differ diff --git a/docs/en_US/images/column_general.png b/docs/en_US/images/column_general.png new file mode 100644 index 000000000..f16f64689 Binary files /dev/null and b/docs/en_US/images/column_general.png differ diff --git a/docs/en_US/images/column_security.png b/docs/en_US/images/column_security.png new file mode 100644 index 000000000..386d68ce2 Binary files /dev/null and b/docs/en_US/images/column_security.png differ diff --git a/docs/en_US/images/column_sql.png b/docs/en_US/images/column_sql.png new file mode 100644 index 000000000..b7b8b2481 Binary files /dev/null and b/docs/en_US/images/column_sql.png differ diff --git a/docs/en_US/images/exclusion_constraint_columns.png b/docs/en_US/images/exclusion_constraint_columns.png new file mode 100644 index 000000000..46d89a370 Binary files /dev/null and b/docs/en_US/images/exclusion_constraint_columns.png differ diff --git a/docs/en_US/images/exclusion_constraint_definition.png b/docs/en_US/images/exclusion_constraint_definition.png new file mode 100644 index 000000000..a3d3d3f43 Binary files /dev/null and b/docs/en_US/images/exclusion_constraint_definition.png differ diff --git a/docs/en_US/images/exclusion_constraint_general.png b/docs/en_US/images/exclusion_constraint_general.png new file mode 100644 index 000000000..8d420a4ec Binary files /dev/null and b/docs/en_US/images/exclusion_constraint_general.png differ diff --git a/docs/en_US/images/exclusion_constraint_sql.png b/docs/en_US/images/exclusion_constraint_sql.png new file mode 100644 index 000000000..f29e30555 Binary files /dev/null and b/docs/en_US/images/exclusion_constraint_sql.png differ diff --git a/docs/en_US/images/foreign_key_action.png b/docs/en_US/images/foreign_key_action.png new file mode 100644 index 000000000..43a8aac8c Binary files /dev/null and b/docs/en_US/images/foreign_key_action.png differ diff --git a/docs/en_US/images/foreign_key_columns.png b/docs/en_US/images/foreign_key_columns.png new file mode 100644 index 000000000..1150e44b7 Binary files /dev/null and b/docs/en_US/images/foreign_key_columns.png differ diff --git a/docs/en_US/images/foreign_key_definition.png b/docs/en_US/images/foreign_key_definition.png new file mode 100644 index 000000000..e84f6183e Binary files /dev/null and b/docs/en_US/images/foreign_key_definition.png differ diff --git a/docs/en_US/images/foreign_key_general.png b/docs/en_US/images/foreign_key_general.png new file mode 100644 index 000000000..ed90b30d6 Binary files /dev/null and b/docs/en_US/images/foreign_key_general.png differ diff --git a/docs/en_US/images/foreign_key_sql.png b/docs/en_US/images/foreign_key_sql.png new file mode 100644 index 000000000..261247126 Binary files /dev/null and b/docs/en_US/images/foreign_key_sql.png differ diff --git a/docs/en_US/images/grant_wizard_step1.png b/docs/en_US/images/grant_wizard_step1.png new file mode 100644 index 000000000..0cda1ed21 Binary files /dev/null and b/docs/en_US/images/grant_wizard_step1.png differ diff --git a/docs/en_US/images/grant_wizard_step2.png b/docs/en_US/images/grant_wizard_step2.png new file mode 100644 index 000000000..03a548537 Binary files /dev/null and b/docs/en_US/images/grant_wizard_step2.png differ diff --git a/docs/en_US/images/grant_wizard_step3.png b/docs/en_US/images/grant_wizard_step3.png new file mode 100644 index 000000000..09cfc49ce Binary files /dev/null and b/docs/en_US/images/grant_wizard_step3.png differ diff --git a/docs/en_US/images/index_definition.png b/docs/en_US/images/index_definition.png new file mode 100644 index 000000000..c511317ef Binary files /dev/null and b/docs/en_US/images/index_definition.png differ diff --git a/docs/en_US/images/index_general.png b/docs/en_US/images/index_general.png new file mode 100644 index 000000000..903cc131a Binary files /dev/null and b/docs/en_US/images/index_general.png differ diff --git a/docs/en_US/images/index_sql.png b/docs/en_US/images/index_sql.png new file mode 100644 index 000000000..2a2ae2462 Binary files /dev/null and b/docs/en_US/images/index_sql.png differ diff --git a/docs/en_US/images/primary_key_definition.png b/docs/en_US/images/primary_key_definition.png new file mode 100644 index 000000000..2574332f9 Binary files /dev/null and b/docs/en_US/images/primary_key_definition.png differ diff --git a/docs/en_US/images/primary_key_general.png b/docs/en_US/images/primary_key_general.png new file mode 100644 index 000000000..ac4bdd28c Binary files /dev/null and b/docs/en_US/images/primary_key_general.png differ diff --git a/docs/en_US/images/primary_key_sql.png b/docs/en_US/images/primary_key_sql.png new file mode 100644 index 000000000..3ce8098e1 Binary files /dev/null and b/docs/en_US/images/primary_key_sql.png differ diff --git a/docs/en_US/images/rule_definition.png b/docs/en_US/images/rule_definition.png new file mode 100644 index 000000000..00496940b Binary files /dev/null and b/docs/en_US/images/rule_definition.png differ diff --git a/docs/en_US/images/rule_general.png b/docs/en_US/images/rule_general.png new file mode 100644 index 000000000..7f7b1cc9e Binary files /dev/null and b/docs/en_US/images/rule_general.png differ diff --git a/docs/en_US/images/rule_sql.png b/docs/en_US/images/rule_sql.png new file mode 100644 index 000000000..88baeaf21 Binary files /dev/null and b/docs/en_US/images/rule_sql.png differ diff --git a/docs/en_US/images/trigger_code.png b/docs/en_US/images/trigger_code.png new file mode 100644 index 000000000..9a4de9618 Binary files /dev/null and b/docs/en_US/images/trigger_code.png differ diff --git a/docs/en_US/images/trigger_definition.png b/docs/en_US/images/trigger_definition.png new file mode 100644 index 000000000..fc8c6f804 Binary files /dev/null and b/docs/en_US/images/trigger_definition.png differ diff --git a/docs/en_US/images/trigger_events.png b/docs/en_US/images/trigger_events.png new file mode 100644 index 000000000..a66ce53b5 Binary files /dev/null and b/docs/en_US/images/trigger_events.png differ diff --git a/docs/en_US/images/trigger_general.png b/docs/en_US/images/trigger_general.png new file mode 100644 index 000000000..5fd6d3664 Binary files /dev/null and b/docs/en_US/images/trigger_general.png differ diff --git a/docs/en_US/images/trigger_sql.png b/docs/en_US/images/trigger_sql.png new file mode 100644 index 000000000..545afa622 Binary files /dev/null and b/docs/en_US/images/trigger_sql.png differ diff --git a/docs/en_US/images/unique_constraint_definition.png b/docs/en_US/images/unique_constraint_definition.png new file mode 100644 index 000000000..0e69bb907 Binary files /dev/null and b/docs/en_US/images/unique_constraint_definition.png differ diff --git a/docs/en_US/images/unique_constraint_general.png b/docs/en_US/images/unique_constraint_general.png new file mode 100644 index 000000000..fd5114a72 Binary files /dev/null and b/docs/en_US/images/unique_constraint_general.png differ diff --git a/docs/en_US/images/unique_constraint_sql.png b/docs/en_US/images/unique_constraint_sql.png new file mode 100644 index 000000000..098052ea1 Binary files /dev/null and b/docs/en_US/images/unique_constraint_sql.png differ diff --git a/docs/en_US/index.rst b/docs/en_US/index.rst index 766794609..e75c6988c 100644 --- a/docs/en_US/index.rst +++ b/docs/en_US/index.rst @@ -109,12 +109,16 @@ Contents: .. toctree:: :maxdepth: 2 - table_dialog + check_dialog column_dialog - constraint_dialog + exclusion_constraint_dialog + foreign_key_dialog index_dialog + primary_key_dialog rule_dialog + table_dialog trigger_dialog + unique_constraint_dialog Management Basics @@ -137,6 +141,7 @@ Contents: managing_server configuration_editor + grant_wizard maintenance diff --git a/docs/en_US/index_dialog.rst b/docs/en_US/index_dialog.rst new file mode 100644 index 000000000..cd10e10cf --- /dev/null +++ b/docs/en_US/index_dialog.rst @@ -0,0 +1,73 @@ +.. _index_dialog: + +**************** +The Index Dialog +**************** + +Use the *Index* dialog to create an index on a specified table or materialized view. + +The *Index* dialog organizes the development of a index through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/index_general.png + +Use the fields in the *General* tab to identify the index: + +* Use the *Name* field to add a descriptive name for the index. The name will be displayed in the *pgAdmin* tree control. +* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index will reside. +* Store notes about the index in the *Comment* field. + +Click the *Definition* tab to continue. + +.. image:: images/index_definition.png + +Use the fields in the *Definition* tab to define the index: + +* Use the drop-down listbox next to *Access Method* to select an index type: + + * Select *btree* to create a B-tree index. A B-tree index may improve performance when managing equality and range queries on data that can be sorted into some ordering (the default). + * Select *hash* to create a hash index. A hash index may improve performance when managing simple equality comparisons. + * Select *gist* to create a GiST index. A GiST index may improve performance when managing values with more than one key. + * Select *gin* to create a GIN index. A GIN index may improve performance when managing two-dimensional geometric data types and nearest-neighbor searches. + * Select *spgist* to create a space-partitioned GiST index. A SP-GiST index may improve performance when managing non-balanced data structures. + * Select *brin* to create a BRIN index. A BRIN index may improve performance when managing minimum and maximum values and ranges. + +* Use the *Fill Factor* field to specify a fill factor for the index. The fill factor specifies how full the selected method will try to fill each index page. +* Move the *Unique?* switch to the *Yes* position to check for duplicate values in the table when the index is created and when data is added. The default is *No*. +* Move the *Clustered?* switch to the *Yes* position to instruct the server to cluster the table. +* Move the *Concurrent build?* switch to the *Yes* position to build the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table. +* Use the *Constraint* field to provide a constraint expression; a constraint expression limits the entries in the index to those rows that satisfy the constraint. + +Use the context-sensitive fields in the *Columns* panel to specify which column(s) the index queries. Click *Add* to add a column: + +* Use the drop-down listbox in *Column* field to select the name of the column from the table. +* If enabled, use the drop-down listbox to select an available *Operator class* to specify the type of action performed on the column. +* If enabled, move the *Sort order* switch to specify the sort order: + + * Select *ASC* to specify an ascending sort order (the default); + * Select *DESC* to specify a descending sort order. + +* If enabled, move the *Nulls* switch to specify the sort order of nulls: + + * Select *First* to specify nulls sort before non-nulls; + * Select *Last* to specify nulls sort after non-nulls (the default). + +* Use the drop-down listbox in the *Collation* field to select a collation to use for the index. + +Click the *SQL* tab to continue. + +Your entries in the *Index* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Index* dialog: + +.. image:: images/index_sql.png + +The example shown demonstrates creating an index named *dist_codes* that indexes the values in the *code* column of the *distributors* table. + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/primary_key_dialog.rst b/docs/en_US/primary_key_dialog.rst new file mode 100644 index 000000000..7e1a49a75 --- /dev/null +++ b/docs/en_US/primary_key_dialog.rst @@ -0,0 +1,48 @@ +.. _primary_key_dialog: + +********************** +The Primary key Dialog +********************** + +Use the *Primary key* dialog to create or modify a primary key constraint. A primary key constraint indicates that a column, or group of columns, uniquely identifies rows in a table. This requires that the values in the selected column(s) be both unique and not null. + +The *Primary key* dialog organizes the development of a primary key constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/primary_key_general.png + +Use the fields in the *General* tab to identify the primary key: + +* Use the *Name* field to add a descriptive name for the primary key constraint. The name will be displayed in the *pgAdmin* tree control. + +Click the *Definition* tab to continue. + +.. image:: images/primary_key_definition.png + +Use the fields in the *Definition* tab to define the primary key constraint: + +* Click inside the *Columns* field and select one or more column names from the drop-down listbox. To delete a selection, click the *x* to the left of the column name. The primary key constraint should be different from any unique constraint defined for the same table; the selected column(s) for the constraints must be distinct. +* Select the name of the tablespace in which the primary key constraint will reside from the drop-down listbox in the *Tablespace* field. +* Select the name of an index from the drop-down listbox in the *Index* field. This field is optional. Adding a primary key will automatically create a unique B-tree index on the column or group of columns listed in the primary key, and will force the column(s) to be marked NOT NULL. +* Use the *Fill Factor* field to specify a fill factor for the table and index. The fill factor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. +* Move the *Deferrable?* switch to the *Yes* position to specify the timing of the constraint is deferrable and can be postponed until the end of the statement. The default is *No*. +* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*. + +Click the *SQL* tab to continue. + +Your entries in the *Primary key* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Primary key* dialog: + +.. image:: images/primary_key_sql.png + +The example shown demonstrates creating a primary key constraint named *dept_pkey* on the *dept_id* column of the *dept* table. + + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/procedure_dialog.rst b/docs/en_US/procedure_dialog.rst index 3e40e96bb..d69e27320 100644 --- a/docs/en_US/procedure_dialog.rst +++ b/docs/en_US/procedure_dialog.rst @@ -1,4 +1,4 @@ -.. _procedure: +.. _procedure_dialog: ******************** The Procedure Dialog @@ -35,9 +35,11 @@ Click the *Options* tab to continue. Use the fields in the *Options* tab to describe or modify the behavior of the procedure: * Use the drop-down listbox under *Volatility* to select one of the following. *VOLATILE* is the default value. - *VOLATILE* indicates that the value can change even within a single table scan, so no optimizations can be made. - *STABLE* indicates that the procedure cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements. - *IMMUTABLE* indicates that the procedure cannot modify the database and always returns the same result when given the same argument values. + + * *VOLATILE* indicates that the value can change even within a single table scan, so no optimizations can be made. + * *STABLE* indicates that the procedure cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements. + * *IMMUTABLE* indicates that the procedure cannot modify the database and always returns the same result when given the same argument values. + * Move the *Strict?* switch to indicate if the procedure always returns NULL whenever any of its arguments are NULL. If *Yes*, the procedure is not executed when there are NULL arguments; instead a NULL result is assumed automatically. The default is *No*. * Move the *Security of definer?* switch to specify that the procedure is to be executed with the privileges of the user that created it. The default is *No*. * Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the procedure, in units of cpu_operator_cost. If the procedure returns a set, this is the cost per returned row. diff --git a/docs/en_US/rule_dialog.rst b/docs/en_US/rule_dialog.rst new file mode 100644 index 000000000..44f7e325d --- /dev/null +++ b/docs/en_US/rule_dialog.rst @@ -0,0 +1,46 @@ +.. _rule_dialog: + +*************** +The Rule Dialog +*************** + +Use the *Rule* dialog to define or modify a rule for a specified table or view. A PostgreSQL rule allows you to define an additional action that will be performed when a SELECT, INSERT, UPDATE, or DELETE is performed against a table. + +The *Rule* dialog organizes the development of a rule through the *General*, and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/rule_general.png + +Use the fields in the *General* tab to identify the rule: + +* Use the *Name* field to add a descriptive name for the rule. The name will be displayed in the *pgAdmin* tree control. Multiple rules on the same table are applied in alphabetical name order. +* Store notes about the rule in the *Comment* field. + +Click the *Definition* tab to continue. + +.. image:: images/rule_definition.png + +Use the fields in the *Definition* tab to write parameters: + +* Click inside the *Event* field to select the type of event that will invoke the rule; event may be *Select*, *Insert*, *Update*, or *Delete*. +* Move the *Do Instead* switch to *Yes* indicate that the commands should be executed instead of the original command; if Do Instead specifies *No*, the rule will be invoked in addition to the original command. +* Specify a SQL conditional expression that returns a boolean value in the *Condition* editor. +* Provide a command in the *Commands* editor that defines the action performed by the rule. + +Click the *SQL* tab to continue. + +Your entries in the *Rule* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Rule* dialog: + +.. image:: images/rule_sql.png + +The example sends a notification when an UPDATE executes against a table. + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/trigger_dialog.rst b/docs/en_US/trigger_dialog.rst new file mode 100644 index 000000000..0128527b3 --- /dev/null +++ b/docs/en_US/trigger_dialog.rst @@ -0,0 +1,67 @@ +.. _trigger_dialog: + +****************** +The Trigger Dialog +****************** + + +Use the *Trigger* dialog to create a trigger or modify an existing trigger. A trigger executes a specified function when certain events occur. + +The *Trigger* dialog organizes the development of a trigger through the following dialog tabs: *General*, *Definition*, *Events*, and *Code*. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/trigger_general.png + +Use the fields in the *General* tab to identify the trigger: + +* Use the *Name* field to add a descriptive name for the trigger. This must be distinct from the name of any other trigger for the same table. The name will be displayed in the *pgAdmin* tree control. Note that if multiple triggers of the same kind are defined for the same event, they will be fired in alphabetical order by name. +* Store notes about the trigger in the *Comment* field. + +Click the *Definition* tab to continue. + +.. image:: images/trigger_definition.png + +Use the fields in the *Definition* tab to define the trigger: + +* Move the *Row trigger?* switch to the *No* position to disassociate the trigger from firing on each row in a table. The default is *Yes*. +* Move the *Constraint trigger?* switch to the *Yes* position to specify the trigger is a constraint trigger. +* If enabled, move the *Deferrable?* switch to the *Yes* position to specify the timing of the constraint trigger is deferrable and can be postponed until the end of the statement. The default is *No*. +* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint trigger is deferred to the end of the statement causing the triggering event. The default is *No*. +* Use the drop-down listbox next to *Trigger Function* to select a trigger function or procedure. +* Use the *Arguments* field to provide an optional (comma-separated) list of arguments to the function when the trigger is executed. The arguments are literal string constants. + +Click the *Events* tab to continue. + +.. image:: images/trigger_events.png + +Use the fields in the *Events* tab to specify how and when the trigger fires: + +* Use the drop-down listbox next to the *Fires* fields to determine if the trigger fires *BEFORE* or *AFTER* a specified event. The default is *BEFORE*. +* Select the type of event(s) that will invoke the trigger; to select an event type, move the switch next to the event to the *YES* position. The supported event types are *INSERT*, *UPDATE*, *DELETE*, and *TRUNCATE*. +* Use the *When* field to provide a boolean condition that will invoke the trigger. +* If defining a column-specific trigger, use the *Columns* field to specify the columns or columns that are the target of the trigger. + +Click the *Code* tab to continue. + +.. image:: images/trigger_code.png + +Use the *Code* field to specify any additional code that will be invoked when the trigger fires. + +Click the *SQL* tab to continue. + +Your entries in the *Trigger* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Trigger* dialog: + +.. image:: images/trigger_sql.png + +The example demonstrates creating a trigger named *log_update* that calls a procedure named *log_account_update* that logs any updates to the *distributors* table. + + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/docs/en_US/unique_constraint_dialog.rst b/docs/en_US/unique_constraint_dialog.rst new file mode 100644 index 000000000..cb327bfe2 --- /dev/null +++ b/docs/en_US/unique_constraint_dialog.rst @@ -0,0 +1,48 @@ +.. _unique_constraint_dialog: + +**************************** +The Unique Constraint Dialog +**************************** + +Use the *Unique constraint* dialog to define a unique constraint for a specified table. Unique constraints ensure that the data contained in a column, or a group of columns, is unique among all the rows in the table. + +The *Unique constraint* dialog organizes the development of a unique constraint through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections. + +.. image:: images/unique_constraint_general.png + +Use the fields in the *General* tab to identify the unique constraint: + +* Use the *Name* field to add a descriptive name for the unique constraint. The name will be displayed in the *pgAdmin* tree control. + +Click the *Definition* tab to continue. + +.. image:: images/unique_constraint_definition.png + +Use the fields in the *Definition* tab to define the unique constraint: + +* Click inside the *Columns* field and select one or more column names from the drop-down listbox. To delete a selection, click the *x* to the left of the column name. The unique constraint should be different from the primary key constraint defined for the same table; the selected column(s) for the constraints must be distinct. +* Select the name of the tablespace in which the unique constraint will reside from the drop-down listbox in the *Tablespace* field. +* Select the name of an index from the drop-down listbox in the *Index* field. This field is optional. Adding a unique constraint will automatically create a unique B-tree index on the column or group of columns listed in the constraint, and will force the column(s) to be marked NOT NULL. +* Use the *Fill Factor* field to specify a fill factor for the table and index. The fill factor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. +* Move the *Deferrable?* switch to the *Yes* position to specify the timing of the constraint is deferrable and can be postponed until the end of the statement. The default is *No*. +* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*. + +Click the *SQL* tab to continue. + +Your entries in the *Unique constraint* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command. + +**Example** + +The following is an example of the sql command generated by user selections in the *Unique constraint* dialog: + +.. image:: images/unique_constraint_sql.png + +The example shown demonstrates creating a unique constraint named *name_con* on the *name* column of the *distributors* table. + + +* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. +* Click the *Save* button to save work. +* Click the *Cancel* button to exit without saving work. +* Click the *Reset* button to restore configuration parameters. + + diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/js/domains.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/js/domains.js index 91df8d244..271614306 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/js/domains.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/js/domains.js @@ -111,7 +111,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { type: 'domain', sqlAlterHelp: 'sql-alterdomain.html', sqlCreateHelp: 'sql-createdomain.html', - dialogHelp: '{{ url_for('help.static', filename='domain_dialog.html') }}', + dialogHelp: '{{ url_for('help.static', filename='domain_dialog.html') }}', label: '{{ _('Domain') }}', collection_type: 'coll-domain', hasSQL: true, diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/templates/column/js/column.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/templates/column/js/column.js index 55d34b6c9..637fca85c 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/templates/column/js/column.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/templates/column/js/column.js @@ -9,8 +9,6 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) { node: 'column', label: '{{ _('Columns') }}', type: 'coll-column', - sqlAlterHelp: 'sql-altertable.html', - sqlCreateHelp: 'sql-altertable.html', columns: ['name', 'atttypid', 'description'] }); }; @@ -59,6 +57,7 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) { hasSQL: true, sqlAlterHelp: 'sql-altertable.html', sqlCreateHelp: 'sql-altertable.html', + dialogHelp: '{{ url_for('help.static', filename='column_dialog.html') }}', canDrop: function(itemData, item, data){ if (pgBrowser.Nodes['schema'].canChildDrop.apply(this, [itemData, item, data])) { var t = pgBrowser.tree, i = item, d = itemData, parents = []; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/templates/check_constraint/js/check_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/templates/check_constraint/js/check_constraint.js index ebb171128..cb33a1a08 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/templates/check_constraint/js/check_constraint.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/templates/check_constraint/js/check_constraint.js @@ -14,6 +14,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) { collection_type: 'coll-constraints', sqlAlterHelp: 'ddl-alter.html', sqlCreateHelp: 'ddl-constraints.html', + dialogHelp: '{{ url_for('help.static', filename='check_dialog.html') }}', hasSQL: true, hasDepends: true, parent_type: ['table'], diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js index 7baf1af43..c65dbf4d0 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/templates/exclusion_constraint/js/exclusion_constraint.js @@ -602,6 +602,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) { collection_type: 'coll-constraints', sqlAlterHelp: 'ddl-alter.html', sqlCreateHelp: 'ddl-constraints.html', + dialogHelp: '{{ url_for('help.static', filename='exclusion_constraint_dialog.html') }}', hasSQL: true, parent_type: 'table', canDrop: true, diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js index 6ef7d8ce9..75bcd9e3e 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/templates/foreign_key/js/foreign_key.js @@ -591,6 +591,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) { collection_type: 'coll-constraints', sqlAlterHelp: 'ddl-alter.html', sqlCreateHelp: 'ddl-constraints.html', + dialogHelp: '{{ url_for('help.static', filename='foreign_key_dialog.html') }}', hasSQL: true, hasDepends: false, parent_type: 'table', diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js index 6f709c4a1..8cc52f843 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/templates/index_constraint/js/index_constraint.js @@ -11,6 +11,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { collection_type: 'coll-constraints', sqlAlterHelp: 'ddl-alter.html', sqlCreateHelp: 'ddl-constraints.html', + {% if node_type == 'primary_key' %} + dialogHelp: '{{ url_for('help.static', filename='primary_key_dialog.html') }}', + {% else %} + dialogHelp: '{{ url_for('help.static', filename='unique_constraint_dialog.html') }}', + {% endif %} hasSQL: true, hasDepends: false, parent_type: 'table', diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/templates/rules/js/rules.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/templates/rules/js/rules.js index 1d00a38a0..c6ab579ec 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/templates/rules/js/rules.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/templates/rules/js/rules.js @@ -39,6 +39,7 @@ function($, _, S, pgAdmin, pgBrowser, CodeMirror) { type: 'rule', sqlAlterHelp: 'sql-alterrule.html', sqlCreateHelp: 'sql-createrule.html', + dialogHelp: '{{ url_for('help.static', filename='rule_dialog.html') }}', label: '{{ _("rule") }}', collection_type: 'coll-table', hasSQL: true, diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/templates/trigger/js/trigger.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/templates/trigger/js/trigger.js index 3b2052794..576d1b675 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/templates/trigger/js/trigger.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/templates/trigger/js/trigger.js @@ -43,6 +43,7 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) { hasDepends: true, sqlAlterHelp: 'sql-altertrigger.html', sqlCreateHelp: 'sql-createtrigger.html', + dialogHelp: '{{ url_for('help.static', filename='trigger_dialog.html') }}', Init: function() { /* Avoid mulitple registration of menus */ if (this.initialized)