Generate Script AS CREATE for Source Objects

With dbForge Studio for PostgreSQL, you can generate DDL scripts for database objects using Generate Script AS CREATE option.

The tool allows you to script the following source objects:

  • Views
  • Materialized Views
  • Functions
  • Trigger Functions
  • Procedures
  • Triggers.

Generate Script AS CREATE

To generate a script for the CREATE statement:

1. Right-click the database object you want to generate a script for.

2. Navigate to Create under the Generate Script AS option in the pop-down menu.

3. Select the output format for the script: To New SQL Window, To File, or To Clipboard.

The opportunity to generate scripts for database objects can be very useful if you need to monitor database changes. You can always restore an old database and compare objects, but having the objects scripted would be easier to access the code. The feature also comes to the aid when you need to deploy just a few changed objects from one database to another.