mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Various doc updates.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
****************
|
||||
Procedure Dialog
|
||||
****************
|
||||
.. _procedure:
|
||||
|
||||
********************
|
||||
The Procedure Dialog
|
||||
********************
|
||||
|
||||
Use the *Procedure* dialog to create a procedure; procedures are supported by EDB Postgres Advanced Server. The *Procedure* dialog allows you to implement options of the CREATE PROCEDURE command; for more information about the CREATE PROCEDURE SQL command, please see the Database Compatibility for Oracle Developer's, available at:
|
||||
|
||||
http://www.enterprisedb.com
|
||||
http://www.enterprisedb.com
|
||||
|
||||
The *Procedure* dialog organizes the development of a procedure through the following dialog tabs: *General*, *Definition*, *Options*, *Arguments*, *Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Procedure* dialog organizes the development of a procedure through the following dialog tabs: *General*, *Definition*, *Options*, *Arguments*, *Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/procedure_general.png
|
||||
|
||||
@@ -15,7 +17,7 @@ Use the fields in the *General* tab to identify a procedure:
|
||||
* Use the *Name* field to add a descriptive name for the procedure. 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 procedure will reside from the drop-down listbox in the *Schema* field.
|
||||
* Store notes about the procedure in the *Comments* field.
|
||||
* Store notes about the procedure in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
@@ -36,10 +38,10 @@ Use the fields in the *Options* tab to describe or modify the behavior of the pr
|
||||
*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.
|
||||
* Use 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*.
|
||||
* Use 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*.
|
||||
* 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.
|
||||
* Use the *Leak proof?* switch to indicate whether the procedure has side effects — it reveals no information about its arguments other than by its return value. The default is *No*.
|
||||
* Move the *Leak proof?* switch to indicate whether the procedure has side effects — it reveals no information about its arguments other than by its return value. The default is *No*.
|
||||
|
||||
Click the *Arguments* tab to continue.
|
||||
|
||||
@@ -61,7 +63,7 @@ Click the *Parameters* tab to continue.
|
||||
Use the fields in the *Parameters* tab to specify settings that will be applied when the procedure is invoked:
|
||||
|
||||
* Use the drop-down listbox next to *Parameter Name* in the *Parameters* panel to select a parameter.
|
||||
* Click the *Add* button to add the variable to *Name* field.
|
||||
* Click the *Add* button to add the variable to *Name* field in the table.
|
||||
* Use the *Value* field to specify the value that will be associated with the selected variable. This field is context-sensitive.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
@@ -87,21 +89,19 @@ Click *Add* to assign additional security labels; to discard a security label, c
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Procedure* 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 *Procedure* dialog:
|
||||
|
||||
.. image:: images/procedure_sql.png
|
||||
|
||||
Your entries in the *Procedure* dialog generate a SQL command; you can review the command on the *SQL* pane.
|
||||
The example demonstrates creating a procedure that returns a list of employees from a table named *emp*. The procedure is a SECURITY DEFINER, and will execute with the privileges of the role that defined the procedure.
|
||||
|
||||
* Click the *Info* button (i) to access online help.
|
||||
* 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.
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
The following is an example of the sql command generated by selections made in the *Procedure* dialog:
|
||||
|
||||
.. image:: images/procedure_sql_example.png
|
||||
|
||||
The example demonstrates creating a procedure that returns a list of employees from a table named *emp*. The procedure is a SECURITY DEFINER, and will execute with the privileges of the role that defined the procedure.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user