2016-10-27 03:45:28 -05:00
|
|
|
.. _synonym_dialog:
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2018-06-15 03:14:12 -05:00
|
|
|
***********************
|
|
|
|
`Synonym Dialog`:index:
|
|
|
|
***********************
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Use the *Synonym* dialog to substitute the name of a target object with a
|
|
|
|
user-defined synonym.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
The *Synonym* dialog organizes the development of a synonym through the
|
|
|
|
*General* tab. The *SQL* tab displays the SQL code generated by dialog
|
|
|
|
selections.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
.. image:: images/synonym_general.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Synonym dialog general tab
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
Use the fields in the *General* tab to identify the synonym:
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Use the *Name* field to specify the name of synonym. The name will be
|
|
|
|
displayed in the *pgAdmin* tree control.
|
|
|
|
* Select the name of the schema in which the synonym will reside from the
|
|
|
|
drop-down listbox in the *Schema* field.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
In the definition panel, identify the target:
|
|
|
|
|
2021-09-26 11:33:11 -05:00
|
|
|
.. image:: images/synonym_definition.png
|
|
|
|
:alt: Synonym dialog general tab
|
|
|
|
:align: center
|
|
|
|
|
2021-10-14 00:43:16 -05:00
|
|
|
* Use the drop-down listbox next to *Target Type* to select the type of
|
2019-03-08 09:29:05 -06:00
|
|
|
object referenced by the synonym.
|
|
|
|
* Use the drop-down listbox next to *Target Schema* to select the name of the
|
|
|
|
schema in which the object resides.
|
|
|
|
* Use the drop-down listbox next to *Target Object* to select the name of the
|
|
|
|
object referenced by the synonym.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
Click the *SQL* tab to continue.
|
|
|
|
|
2018-01-11 10:58:30 -06:00
|
|
|
Your selections and entries in the *Synonym* dialog generate a SQL command.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
.. image:: images/synonym_sql.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Synonym dialog sql tab
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-09-16 05:14:49 -05:00
|
|
|
|
2016-10-27 03:45:28 -05:00
|
|
|
The example creates a synonym for the *emp* table named *emp_hist*.
|
2016-09-16 05:14:49 -05:00
|
|
|
|
|
|
|
* Click the *Save* button to save work.
|
2021-09-26 11:33:11 -05:00
|
|
|
* Click the *Close* button to exit without saving work.
|
2016-09-16 05:14:49 -05:00
|
|
|
* Click the *Reset* button to restore configuration parameters.
|
|
|
|
|
|
|
|
|