Another interesting tool is the source code preview which permits the user to visualize the source code of any object on the fly without the need to export them to a SQL file (in case of the SQL code) or by opening the database model file in a text editor (in case of XML definition).
Additionally, it is possible to modify the generated SQL syntax for the current object by changing the value of the field
Version. This technique is quite useful when you need to see how the code is generated in different versions of PostgreSQL in order to determine if that code can be or not exported to a specific version. Also, it is possible to save the currently displayed SQL code to an external file for testing purposes by clicking the
Save SQL button.
This dialog can be activated by pressing the shortcut
Alt + S or by right-clicking an object and selecting the Source code menu item. If no object is selected the default behavior is to show the source code of the entire database model. All fields in this dialog are described as follows:
||The name of the current object that the code is being visualized.|
||The type of the current object.|
||The version in which the source code must be generated. The SQL tab is automatically updated whenever the user changes the current value of this field. Changing this field only affects the SQL code generation.|
||This tab shows the SQL code of the object.|
||This tab shows the XML code of the object.|
||This field changes the way the code is generated for certain kinds of objects. The value