Additional docs from Susan.

pull/3/head
Dave Page 2016-05-26 15:29:33 +01:00
parent 7aea8f8536
commit b85fa58344
46 changed files with 634 additions and 3 deletions

View File

@ -0,0 +1,81 @@
.. _domain:
*****************
The Domain Dialog
*****************
Use the *Domain* dialog to define a domain. A domain is a data type definition that may constrain permissible values. Domains are useful when you are creating multiple tables that contain comparable columns; you can create a domain that defines constraints that are common to the columns and re-use the domain definition when creating the columns, rather than individually defining each set of constraints.
The *Domain* dialog organizes the development of a domain through the following tabs: *General*, *Definition*, *Constraints*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/domain_general.png
Use the fields on the *General* tab to identify a domain:
* Use the *Name* field to add a descriptive name for the domain. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select a role.
* Select the name of the schema in which the collation will reside from the drop-down listbox in the *Schema* field.
* Store notes about the domain in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/domain_definition.png
Use the fields in the *Definition* tab to describe the domain:
* Use the drop-down listbox next to *Base type* to specify a data type.
* Use the context-sensitive *Length* field to specify a numeric length for a numeric type.
* Use the context-sensitive *Precision* field to specify the total count of significant digits for a numeric type.
* Specify a default value for the domain data type in the *Default* field. The data type of the default expression must match the data type of the domain. If no default value is specified, then the default value is the null value.
* Move the *Not Null* switch to specify the values of this domain are prevented from being null.
* Use the drop-down listbox next to *Collation* to apply a collation cast. If no collation is specified, the underlying data type's default collation is used. The underlying type must be collatable if COLLATE is specified.
Click the *Constraints* tab to continue.
.. image:: images/domain_constraints.png
Use the fields in the *Constraints* tab to specify rules for the domain. Click *Add* to set constraints:
* Use the *Name* field to specify a name for the constraint.
* Use the *Check* field to provide an expression for the constraint.
* Use the *Validate* checkbox to determine whether the constraint will be validated. The default checkbox is checked and sets a validation requirement.
CHECK clauses specify integrity constraints or tests which values of the domain must satisfy. Each constraint must be an expression producing a Boolean result. It should use the key word VALUE to refer to the value being tested. Expressions evaluating to TRUE or UNKNOWN succeed. If the expression produces a FALSE result, an error is reported and the value is not allowed to be converted to the domain type.
CHECK expressions cannot contain subqueries nor refer to variables other than VALUE.
If a domain has multiple CHECK constraints, they will be tested in alphabetical order by name.
Click *Add* to set additional constraints; to discard a constraint, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Click the *Security* tab to continue.
.. image:: images/domain_security.png
Use the *Security Labels* panel to assign security labels. Click *Add* to add a label:
* 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 specify each additional label; to discard a 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 *Domain* 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 selections made in the *Domain* dialog:
.. image:: images/domain_sql.png
The example shown demonstrates creating a domain named *minimum-wage* that confirms that the value entered is greater than or equal to *7.25*.
* 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.

View File

@ -0,0 +1,66 @@
.. _foreign_server:
*************************
The Foreign Server Dialog
*************************
Use the *Foreign Server* dialog to create a foreign server. A foreign server typically encapsulates connection information that a foreign-data wrapper uses to access an external data resource. Each foreign data wrapper may connect to a different foreign server; in the *pgAdmin* tree control, expand the node of the applicable foreign data wrapper to launch the *Foreign Server* dialog.
The *Foreign Server* dialog organizes the development of a foreign server through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/foreign_server_general.png
Use the fields in the *General* tab to identify the foreign server:
* Use the *Name* field to add a descriptive name for the foreign server. The name will be displayed in the *pgAdmin* tree control. It must be unique within the database.
* Use the drop-down listbox next to *Owner* to select a role.
* Store notes about the foreign server in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/foreign_server_definition.png
Use the fields in the *Definition* tab to set parameters:
* Use the *Type* field to specify a server type.
* Use the *Version* field to specify a server version.
Click the *Options* tab to continue.
.. image:: images/foreign_server_options.png
Use the fields in the *Options* tab to specify options. Click the *Add* button to create an option clause for the foreign server.
* Specify the option name in the *Option* field.
* Provide a corresponding value in the *Value* field.
Click *Add* to create each additional clause; to discard an option, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Click the *Security* tab to continue.
.. image:: images/foreign_server_security.png
Use the *Security* tab to assign security privileges to the foreign server. Click *Add* before you 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.
* Select the name of the role from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the foreign server. This is a required field.
Click *Add* to assign a new set of privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* dialog.
Click the *SQL* tab to continue.
Your entries in the *Foreign Server* 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 Server* dialog:
.. image:: images/foreign_server_sql.png
The example shown demonstrates creating a foreign server for the foreign data wrapper *hdfs_fdw*. It has the name *hdfs_server*; its type is *hiveserver2*. Options for the foreign server include a host and a port.
* 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.

View File

@ -0,0 +1,61 @@
.. _fts_configuration:
****************************
The FTS Configuration dialog
****************************
Use the *FTS Configuration* dialog to configure a full text search. A text search configuration specifies a text search parser that can divide a string into tokens, along with dictionaries that can identify searchable tokens.
The *FTS Configuration* dialog organizes the development of a FTS configuration through the following dialog tabs: "*General*, *Definition*, and *Tokens*. The *SQL* tab displays the SQL code generated by dialog selections.
Click the *General* tab to begin.
.. image:: images/fts_configuration_general.png
Use the fields in the *General* tab to identify a FTS configuration:
* Use the *Name* field to add a descriptive name for the FTS configuration. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to specify the role that will own the configuration.
* Select the name of the schema in which the FTS configuration will reside from the drop-down listbox in the *Schema* field.
* Store notes about the FTS configuration in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/fts_configuration_definition.png
Use the fields in the *Definition* tab to define parameters:
* Select the name of the text search parser from the drop-down listbox in the *Parser* field.
* Select a language from the drop-down listbox in the *Copy Config* field.
Click the *Tokens* tab to continue.
.. image:: images/fts_configuration_tokens.png
Use the fields in the *Tokens* tab to add a token:
* Use the *Tokens* field to specify the name of a token.
* Click *Add* to create a token.
* Use the *Dictionary* field to specify a dictionary.
Repeat these steps to add additional tokens; to discard a token, 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 *FTS Configuration* 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 *FTS Configuration* dialog:
.. image:: images/fts_configuration_sql.png
The example shown demonstrates creating a FTS configuration named *meme_phrases*. It uses the *default* parser.
* 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.

View File

@ -0,0 +1,61 @@
.. _fts_dictionary:
*************************
The FTS Dictionary Dialog
*************************
Use the *FTS Dictionary* dialog to create a full text search dictionary. You can use a predefined templates or create a new dictionary with custom parameters.
The *FTS Dictionary* dialog organizes the development of a FTS dictionary through the following dialog tabs: *General*, *Definition*, and *Options*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/fts_dictionary_general.png
Use the fields in the *General* tab to identify the dictionary:
* Use the *Name* field to add a descriptive name for the dictionary. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select a role.
* Select the name of the schema in which the dictionary will reside from the drop-down listbox in the *Schema* field.
* Store notes about the dictionary in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/fts_dictionary_definition.png
Use the field in the *Definition* tab to choose a template from the drop-down listbox:
*Select *ispell* to select the Ispell template. The Ispell dictionary template supports morphological dictionaries, which can normalize many different linguistic forms of a word into the same lexeme. For example, an English Ispell dictionary can match all declensions and conjugations of the search term bank, e.g., banking, banked, banks, banks', and bank's. Ispell dictionaries usually recognize a limited set of words, so they should be followed by another broader dictionary; for example, a Snowball dictionary, which recognizes everything.
*Select *simple* to select the simple template. The simple dictionary template operates by converting the input token to lower case and checking it against a file of stop words. If it is found in the file then an empty array is returned, causing the token to be discarded. If not, the lower-cased form of the word is returned as the normalized lexeme. Alternatively, the dictionary can be configured to report non-stop-words as unrecognized, allowing them to be passed on to the next dictionary in the list.
*Select *snowball* to select the Snowball template. The Snowball dictionary template is based on a project by Martin Porter, inventor of the popular Porter's stemming algorithm for the English language. Snowball now provides stemming algorithms for many languages (see the Snowball site for more information). Each algorithm understands how to reduce common variant forms of words to a base, or stem, spelling within its language. A Snowball dictionary recognizes everything, whether or not it is able to simplify the word, so it should be placed at the end of the dictionary list. It is useless to have it before any other dictionary because a token will never pass through it to the next dictionary.
*Select *synonym* to select the synonym template. This dictionary template is used to create dictionaries that replace a word with a synonym. Phrases are not supported (use the thesaurus template (Section 12.6.4) for that). A synonym dictionary can be used to overcome linguistic problems, for example, to prevent an English stemmer dictionary from reducing the word Paris to pari.
*Select *thesaurus* to select the thesaurus template. A thesaurus dictionary replaces all non-preferred terms by one preferred term and, optionally, preserves the original terms for indexing as well. PostgreSQL's current implementation of the thesaurus dictionary is an extension of the synonym dictionary with added phrase support.
Click the *Options* tab to continue.
.. image:: images/fts_dictionary_options.png
Use the fields in the *Options* tab to provide template-specific options. Click *Add* to add an option clause:
* Specify the name of an option in the *Option* field
* Provide a value in the *Value* field.
Click *Add* to specify each additional option/value pair; to discard an option, 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 *FTS Dictionary* dialog generate a 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 *FTS Dictionary* dialog:
.. image:: images/fts_dictionary_sql.png
The example shown demonstrates creating a custom dictionary named *more_stopwords* which is based on the simple template and is configured to use standard English.
* 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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -29,6 +29,7 @@ Contents:
preferences
help
Getting Started
===============
@ -44,6 +45,7 @@ Contents:
connecting
error_messages
Creating Cluster Level Objects
==============================
@ -58,8 +60,8 @@ Contents:
resource_group_dialog
role_dialog
tablespace_dialog
Creating Database Objects
=========================
@ -74,17 +76,26 @@ Contents:
cast_dialog
collation_dialog
domain_dialog
domain_constraint_dialog
event_trigger_dialog
extension_dialog
foreign_data_wrapper_dialog
foreign_server_dialog
foreign_table_dialog
fts_configuration_dialog
fts_dictionary_dialog
fts_parser_dialog
fts_template_dialog
function_dialog
materialized_view_dialog
procedure_dialog
schema_dialog
sequence_dialog
type_dialog
user_mapping_dialog
view_dialog
Creating or Modifying a Table
=============================
@ -128,6 +139,7 @@ Contents:
configuration_editor
maintenance
Backup and Restore
==================
@ -140,8 +152,8 @@ Contents:
backup
restore
Developer Tools
===============
@ -157,7 +169,7 @@ Contents:
data_filter
debugger
pgAdmin Deployment
==================

View File

@ -0,0 +1,79 @@
.. _materialized_view:
****************************
The Materialized View Dialog
****************************
Use the *Materialized View* dialog to define a materialized view. A materialized view is a stored or cached view that contains the result set of a query. Use the REFRESH MATERIALIZED VIEW command to update the content of a materialized view.
The *Materialized View* dialog organizes the development of a materialized_view through the following dialog tabs: *General*, *Definition*, *Security*, and *Storage*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/materialized_view_general.png
Use the fields in the *General* tab to identify the materialized view:
* Use the *Name* field to add a descriptive name for the materialized view. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select a role.
* Select the name of the schema in which the materialized view will reside from the drop-down listbox in the *Schema* field.
* Store notes about the materialized view in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/materialized_view_definition.png
Use the text editor field in the *Definition* tab to write a query.
Click the *Security* tab to continue.
.. image:: images/materialized_view_security.png
Use the *Security* tab to assign privileges and define security labels.
Use the *Privileges* panel to assign privileges to a role. Click *Add* to set privileges for the materialized view:
* 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 privilege to the specified user.
* 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 additional privileges; to discard a privilege, 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 materialized view. 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 *Storage* tab to continue.
.. image:: images/materialized_view_storage.png
Use the fields in the *storage* tab to maintain the materialized view:
* Move the *With Data* switch to the *Yes* position to specify the materialized view should be populated at creation time. If not, the materialized view cannot be queried until you invoke REFRESH MATERIALIZED VIEW.
* Use the drop-down listbox next to *Tablespace* to select a location for the materialized view.
* Use the *Fill Factor* field to specify a fill factor for the materialized view.
The Vacuum Table provides default values for maintenance operations. To change the default values:
* Move the *Custom auto-vacuum?* switch to the *Yes* position to perform custom maintenance on the materialized view.
* Move the *Enabled?* switch to the *Yes* position to select values in the *Vacuum table*. Provide values for each row in the *Value* column.
Click the *SQL* tab to continue.
Your entries in the *Materialized View* 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 *Materialized View* dialog:
.. image:: images/materialized_view_sql.png
The example shown creates a query named *new_hires* that stores the result of the displayed query in the *pg_default* tablespace.
* 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.

143
docs/en_US/type_dialog.rst Normal file
View File

@ -0,0 +1,143 @@
.. _type:
***************
The Type Dialog
***************
Use the *Type* dialog to register a custom data type.
The *Type* dialog organizes the development of a data type through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/type_general.png
Use the fields in the *General* tab to identify the custom data type:
* Use the *Name* field to add a descriptive name for the type. The name will be displayed in the *pgAdmin* tree control. The type name must be distinct from the name of any existing type, domain, or table in the same schema.
* Use the drop-down listbox next to *Owner* to select a role.
* Select the name of the schema in which the type will reside from the drop-down listbox in the *Schema* field.
* Store notes about the type in the *Comments* field.
Click the *Definition* tab to continue.
Select a data type from the drop-down listbox next to *Type* on the *Definition* tab; the panel below changes to display the options appropriate for the selected data type. Use the fields in the panel to define the data type.
There are five data types:
* *Composite Type*
* *Enumeration Type*
* *Range Type*
* *External Type* (or *Base Type*)
* *Shell Type*
If you select *Composite* in the *Type* field, the *Definition* tab displays the *Composite Type* panel:
.. image:: images/type_composite.png
Click *Add* to provide parameters for the type and click the *Edit* icon to the left of the row to enter values in the dropdown *General* panel. Fields on the *General* panel are context sensitive and may be disabled.
* Use the *Member Name* field to add an attribute name.
* Use the *Type* field to add a datatype.
* Use the *Length/Precision* field to specify the maximum length of a non-numeric type, or the total count of significant digits in a numeric type.
* Use the *Scale* field to specify the number of digits to the right of the decimal point.
* Use the *Collation* field to specify an attribute's collation.
Click *Add* to create an additional row of parameters; click the *Edit* icon to the left of a row to enter values on the dropdown panel; click the trash icon to the left of the row to discard a row of parameters.
If you select the *Enumeration* in the *Type* field, the *Definition* tab displays the *Enumeration Type* panel:
.. image:: images/type_enumeration.png
Click *Add* to provide a label for the type.
* Use the *Label* field to add a label, which must be less than 64 bytes long.
Click *Add* after each selection to create additional labels; to discard a label, click the trash icon to the left of the row.
If you select *External*, the *Definition* tab displays the *External Type* panel:
.. image:: images/type_external.png
On the *Required* tab:
* Use the drop-down listbox next to the *Input function* field to add an input_function. The input_function converts the type's external textual representation to the internal representation used by the operators and functions defined for the type.
* Use the drop-down listbox next to the *Output function* field to add an output_function. The output_function converts the type's internal representation used by the operators and functions defined for the type to the type's external textual representation.
On the *Optional-1* tab:
* Use the drop-down listbox next to the optional *Receive Function* field to select a receive_function. The optional receive_function converts the type's external binary representation to the internal representation. If this function is not supplied, the type cannot participate in binary input.
* Use the drop-down listbox next to the optional *Send function* field to select a send_function. The optional send_function converts from the internal representation to the external binary representation. If this function is not supplied, the type cannot participate in binary output.
* Use the drop-down listbox next to the optional *Typmod in function* field tab to select a type_modifier_input_function.
* Use the drop-down listbox next to the optional *Typmod out function* field tab to select a type_modifier_output_function. It is allowed to omit the type_modifier_output_function, in which case the default display format is the stored typmod integer value enclosed in parentheses.
* Use the optional *Internal length* to specify a value for internal representation.
* Move the *Variable?* switch to specify the internal representation is of variable length (VARIABLE). The default is a fixed length positive integer.
* Specify a default value in the optional *Default* field in cases where a column of the data type defaults to something other than the null value. Specify the default with the DEFAULT key word. (A default can be overridden by an explicit DEFAULT clause attached to a particular column.)
* Use the drop-down listbox next to the optional *Analyze function* field to select a function for performing type-specific statistics collection for columns of the data type.
* Use the drop-down listbox next to the optional *Category type* field to help control which implicit cast will be applied in ambiguous situations.
* Move the *Preferred?* switch to *Yes* to specify the selected category type is preferred. The default is *No*.
On the *Optional-2* tab:
* Use the drop-down listbox next to the optional *Element type* field to specify a data type.
* Use the optional *Delimiter* field to indicate the delimiter to be used between values in the external representation of arrays for this data type. The default delimiter is the comma (,). Note that the delimiter is associated with the array element type, not the array type itself.
* Use the drop-down listbox next to *Alignment type* to specify the storage alignment required for the data type. The allowed values (char, int2, int4, and double) correspond with alignment on 1, 2, 4, or 8 byte boundaries.
* Use the drop-down listbox next to optional *Storage type* to select a strategy for storing data.
* Move the *Passed by value?* switch to *Yes* to override the existing data type value. The default is *No*.
* Move the *Collatable?* switch to *Yes* to specify column definitions and expressions of the type may carry collation information through use of the COLLATE clause. The default is *No*.
If you select *Range* in the *Type* field, the *Definition* tab displays the *Range* panel. Fields on the *Range* panel are context-sensitive and may be disabled.
.. image:: images/type_range.png
* Use the drop-down listbox next to *Sub-type* to select an associated b-tree operator class (to determine the ordering of values for the range type).
* Use the drop-down listbox next to *Sub-type operator class* to use a non-default operator class.
* Use the drop-down listbox next to *Collation* to use a non-default collation in the range's ordering if the sub-type is collatable.
* Use the drop-down listbox next to *Canonical function* to convert range values to a canonical form.
* Use the drop-down listbox next to *Sub-type diff function* to select a user-defined subtype_diff function.
If you select *Shell* in the *Type* field, the *Definition* tab displays the *Shell* panel:
.. image:: images/type_shell.png
A shell type is a placeholder for a type and has no parameters.
Click the *Security* tab to continue.
.. image:: images/type_security.png
Use the *Security* tab to assign privileges and define security labels.
Use the *Privileges* panel to assign privileges to a role. Click *Add* to specify privileges for the type:
* Select the name of the role that will be granted privileges on the type 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 privilege to the specified user.
* Select the name of the role that is granting privileges from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the database.
Click *Add* to assign additional privileges; to discard a privilege, 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 type. 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 *Type* 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 a sql command generated by user selections made in the *Type* dialog:
.. image:: images/type_sql.png
The example shown demonstrates creating a data type named *work_order*. The data type uses the *Enumeration Type* form with three labels: new, open and closed.
* 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.

View File

@ -0,0 +1,48 @@
.. _user_mapping:
***********************
The User Mapping Dialog
***********************
Use the *User Mapping* dialog to define a new mapping of a user to a foreign server.
The *User Mapping* dialog organizes the development of a user mapping through the following dialog tabs: *General* and *Options*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/user_mapping_general.png
Use the drop-down listbox in the *User* field in the *General* tab to identify the connecting role:
* Select *CURRENT_USER* to use the name of the current role.
* Select *PUBLIC* if no other user-specific mapping is applicable.
* Select a pre-defined role name to specify the name of an existing user.
Click the *Options* tab to continue.
.. image:: images/user_mapping_options.png
Use the fields in the *Options* tab to specify connection options; the accepted option names and values are specific to the foreign data wrapper associated with the server specified in the user mapping. Click the *Add* button to add an option/value pair.
* Specify the option name in the *Option* field.
* Provide a corresponding value in the *Value* field.
Click *Add* to specify each additional option/value pair; to discard an option, 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 *User Mapping* 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 *User Mapping* dialog:
.. image:: images/user_mapping_sql.png
The example shown demonstrates a user mapping for the *hdfs_server*. The user is *CURRENT_USER* with a password *secret*.
* 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.

View File

@ -0,0 +1,73 @@
.. _view:
***************
The View Dialog
***************
Use the *View* dialog to define a view of a query. The view is not physically materialized; the query runs each time the view is referenced in a query.
The *View* dialog organizes the development of a View through the following dialog tabs: *General*, *Definition*, and *Security*". The *SQL* tab displays the SQL code generated by dialog selections.
Click the *General* tab to begin.
.. image:: images/view_general.png
Use the fields in the *General* tab to identify a view:
* Use the *Name* field to add a descriptive name for the view. The name of the view must be distinct from the name of any other view, table, sequence, index or foreign table in the same schema. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select a role.
* If applicable, select the name of the schema in which the view will reside from the drop-down listbox in the *Schema* field.
* Store notes about the view in the *Comments* field.
Click the *Definition* tab to continue.
.. image:: images/view_definition.png
Use the fields in the *Definition* tab to define properties of the view:
* Check the *Security Barrier* checkbox to specify if the view is intended to provide row-level security.
* Use the drop-down listbox next to *With Check Option* to select from *No*, *Local* or *Cascaded*.
The *Local* option specifies that new rows are only checked against the conditions defined in the view. Any conditions defined on underlying base views are not checked (unless you specify the CHECK OPTION).
The *Cascaded* option specifies new rows are checked against the conditions of the view and all underlying base views.
* Use the workspace in the *Definition* field to write a query to create a view.
Click the *Security* tab to continue.
.. image:: images/view_security.png
Use the *Security* tab to assign privileges and define security labels.
Use the *Privileges* panel to assign privileges to a role. Click *Add* to set privileges for the view:
* 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 privilege to the specified user.
* 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 additional privileges; to discard a privilege, 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 view. 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 *View* 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 *View* dialog:
.. image:: images/view_sql.png
The example shown demonstrates creating a view named *distributor_codes* that includes the content of the *code* column from 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.

View File

@ -52,6 +52,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
type: 'user_mapping',
sqlAlterHelp: 'sql-alterusermapping.html',
sqlCreateHelp: 'sql-createusermapping.html',
dialogHelp: '{{ url_for('help.static', filename='user_mapping_dialog.html') }}',
label: '{{ _('User Mapping') }}',
hasSQL: true,
hasDepends: true,

View File

@ -111,6 +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') }}',
label: '{{ _('Domain') }}',
collection_type: 'coll-domain',
hasSQL: true,

View File

@ -413,6 +413,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
type: 'fts_configuration',
sqlAlterHelp: 'sql-altertsconfig.html',
sqlCreateHelp: 'sql-createtsconfig.html',
dialogHelp: '{{ url_for('help.static', filename='fts_configuration_dialog.html') }}',
canDrop: true,
canDropCascade: true,
label: '{{ _('FTS Configuration') }}',

View File

@ -57,6 +57,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
type: 'fts_dictionary',
sqlAlterHelp: 'sql-altertsdictionary.html',
sqlCreateHelp: 'sql-createtsdictionary.html',
dialogHelp: '{{ url_for('help.static', filename='fts_dictionary_dialog.html') }}',
canDrop: true,
canDropCascade: true,
label: '{{ _('FTS dictionary') }}',

View File

@ -279,6 +279,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify, Backgrid) {
type: 'type',
sqlAlterHelp: 'sql-altertype.html',
sqlCreateHelp: 'sql-createtype.html',
dialogHelp: '{{ url_for('help.static', filename='type_dialog.html') }}',
label: '{{ _('Type') }}',
collection_type: 'coll-type',
hasSQL: true,

View File

@ -38,6 +38,7 @@ function($, _, S, pgAdmin, alertify, pgBrowser, CodeMirror) {
type: 'mview',
sqlAlterHelp: 'sql-altermaterializedview.html',
sqlCreateHelp: 'sql-creatematerializedview.html',
dialogHelp: '{{ url_for('help.static', filename='materialized_view_dialog.html') }}',
label: '{{ _("Materialized View") }}',
hasSQL: true,
hasDepends: true,

View File

@ -38,6 +38,7 @@ function($, _, S, pgAdmin, pgBrowser, CodeMirror) {
type: 'view',
sqlAlterHelp: 'sql-alterview.html',
sqlCreateHelp: 'sql-createview.html',
dialogHelp: '{{ url_for('help.static', filename='view_dialog.html') }}',
label: '{{ _("View") }}',
hasSQL: true,
hasDepends: true,