Compare commits

...
1355 Commits
Author SHA1 Message Date
Akshay Joshi 9898e114f1 Update version for release. 2020-10-12 18:03:27 +05:30
Aditya Toshniwal 67242862c4 Fixed an issue where extensions are getting added multiple times when the user uses the "Save As" option.
refs #4855
2020-10-12 18:01:53 +05:30
Nikhil Mohite 2b7e3ce64e Fixed an issue on a new connection when the server is disconnected and we are trying to connect it using the new connection model. 2020-10-12 17:14:42 +05:30
Khushboo Vashi 49b139bb75 Added escape and unescape for the strings used in query tool and new connection support. Fixes #5899. 2020-10-12 16:20:33 +05:30
Nidhi Bhammar b11a0d50e6 Fixed documentation review comments for Macro support.
refs #5857
2020-10-12 16:13:34 +05:30
Domenico Sgarbossa 33e9b74388 Update Italian translation. 2020-10-12 14:09:17 +05:30
Fred Escallier cc282b3585 Update French translation. 2020-10-12 14:07:45 +05:30
Identifier Anonymous 92f9ad48a8 Update Japanese translation. 2020-10-12 14:05:44 +05:30
Pradip Parkale 1bb510cdd4 Fixed following issues in the function module:
1) The volatility option is not reflecting. It stays volatile always when creating the function.
2) Set "Returns as set" to true and enter estimated rows like 12. Now set returns as set to false and save.
   It gives ERROR: ROWS is not applicable when the function does not return a set.
   Need to clear estimated rows when returns as set is false.
3) If estimated rows are added and support function is selected then SQL looks ugly.

Fixes #5843
2020-10-12 14:01:04 +05:30
Nikhil Mohite fa267805c9 Fixed fg_color and bg_color issue for connection string on query tool.
refs #3794
2020-10-12 13:51:48 +05:30
Akshay Joshi 556278dbc5 Added support to view trigger function under the respective trigger node. Fixes #2519 2020-10-12 13:49:54 +05:30
Pradip Parkale 365ec0ba9f Fixed an issue where 'Rows X' column values were not visible properly for Explain Analyze in Dark theme. Fixes #5853. 2020-10-09 18:17:27 +05:30
Akshay Joshi 4587cf73c2 Update Dependencies. 2020-10-09 18:03:47 +05:30
Akshay Joshi 65aba21c14 Update message catalogs. 2020-10-09 18:00:25 +05:30
Akshay Joshi 0bf6e81faa Fixed linter error. 2020-10-09 12:09:23 +05:30
Khushboo Vashi f4d6290b50 Update the macro help link. 2020-10-09 11:52:46 +05:30
Aditya Toshniwal ca8dc42d14 Updated the packages and yarn.lock file. 2020-10-09 11:49:03 +05:30
Aditya Toshniwal a4e746c5a4 Ensure that '.sql' extension is added when saving a file with SQL format.
refs #4855
2020-10-09 11:46:32 +05:30
Nikhil Mohite 1c796720be Fixed the following issues for RM 3794:
1. Updated connection success message. (Added database name in the success message.)
2. Resolve issue of the mouse pointer and dropdown will show below the connection string only.
3. Added loader for both new connections and load existing connections.
4. Removed async: false for update connection.

refs #3794
2020-10-08 11:38:05 +05:30
Murtuza Zabuawala 483eeeca39 Added gettext and escape around Macro name and label. Fixes #5894 2020-10-08 11:23:45 +05:30
Akshay Joshi f27527a614 Fixed API test cases failed for PG 9.5 due to change in the order of ACL. 2020-10-07 08:41:21 +05:30
Nidhi Bhammar 609904cfb3 Added documentation for Macro support. Fixes #5857 2020-10-06 17:35:04 +05:30
Pradip Parkale 82e912ffad Fixed 'can't execute an empty query' message if the user change the option of Auto FK Index. Fixes #5835 2020-10-06 17:20:43 +05:30
Akshay Joshi 6c4049f29a Added RESQL/MSQL test cases for Functions. Fixes #5395
Initial patch sent by Nikhil Mohite.
2020-10-06 17:13:41 +05:30
Akshay Joshi 9466278be2 Fixed invalid literal issue when fetching dependencies for Materialized View. Fixed #5882 2020-10-05 17:53:47 +05:30
Pradip Parkale e4029cca04 Ensure that the user should be able to change the start value of the existing sequence. Fixes #5855 2020-10-05 16:38:16 +05:30
Akshay Joshi bcb2f833cd Fixed PEP8 2020-10-05 15:09:39 +05:30
Akshay Joshi a0a15fa643 Fixed feature tests for autocomplete. 2020-10-05 15:08:09 +05:30
Khushboo Vashi c28509ac28 Fixed an issue where the user is unable to change the macro name. Fixes #5885 2020-10-05 14:40:21 +05:30
Akshay Joshi 542be2b2d4 Fixed issues where the 'pg_pltemplate' system catalog is removed from PG 13 and it gives error while creating the language. 2020-10-05 14:35:48 +05:30
Pradip Parkale 9a77d4dc1a Allow users to modify the option settings of the procedure.
refs #5843
2020-10-05 09:02:27 +05:30
Akshay Joshi 558d25fabc Updated 'sqlparse' and 'pytz' module to the latest version. 2020-10-01 16:02:30 +05:30
Nikhil Mohite be7bb81a19 Allow user to change the database connection from an open query tool tab. Fixes #3794 2020-10-01 13:29:46 +05:30
Khushboo Vashi 228d4bb321 Fixed SQLAlchemy operation error with the boolean value as true/false for Python version < 3.7 2020-10-01 13:29:46 +05:30
Pradip Parkale 656e239e55 Fixed API test cases introduce in the commit for #5867.
refs #5867
2020-10-01 13:29:46 +05:30
Akshay Joshi 300de05a20 Merged the latest code of 'pgcli' used for the autocomplete feature. Fixes #5497 2020-10-01 13:29:46 +05:30
Dave Page 3f817494f8 Use PostgreSQL 13 libs. 2020-09-30 09:49:59 +01:00
Pradip Parkale b097cec45e Fixed an issue where some properties are not being updated correctly for the shared server. Fixes #5867 2020-09-30 12:29:59 +05:30
Akshay Joshi a707d818f5 Removed (Beta) keyword from Schema Diff and High Contrast theme. 2020-09-29 18:27:28 +05:30
Akshay Joshi 1c70a43b91 Fixed code smells 'Define a constant instead of duplicating this literal' reported by SonarQube. 2020-09-29 15:08:14 +05:30
Aditya Toshniwal c7c199210d Fixed an issue where file extension is stripped on renaming a file. Fixes #4855 2020-09-29 11:03:38 +05:30
Aditya Toshniwal 3e7cdcdf90 Ensure that 'ctrl + a' shortcut does not move the cursor in SQL editor. Fixes #5131 2020-09-29 10:56:57 +05:30
Aditya Toshniwal 1fc06b8d57 Added useful message when the explain plan is not used and empty. Fixes #4806 2020-09-28 17:51:59 +05:30
Azad Salahli 43f1953aa7 Fixed incorrect import in setup.py 2020-09-28 17:47:38 +05:30
Khushboo Vashi 4616a74029 Added Macro support. Fixes #1402 2020-09-28 15:26:45 +05:30
Akshay Joshi 952197f130 Added support to ignore the owner while comparing objects in the Schema Diff tool. Fixes #5200. 2020-09-28 15:22:46 +05:30
Akshay Joshi 68588fbb44 Fixed an issue where schema diff is showing identical table as different due to default vacuum settings. Fixes #5826 2020-09-24 13:24:25 +05:30
Pradip Parkale c1d04747a1 Ensure that the 'Remove Server' option should be visible in the context menu. Fixes #5861 2020-09-24 10:58:30 +05:30
Pradip Parkale f8611416ec Added the 'PARALLEL UNSAFE' option to the missing SQL files.
refs #5843
2020-09-24 10:47:42 +05:30
Pradip Parkale 2e55b1f660 Fixed an issue where the 'PARALLEL UNSAFE' option is missing from reverse engineering SQL of function/procedure node. Fixes #5843. 2020-09-23 13:21:50 +05:30
Aditya Toshniwal f3462e36a4 Fixed cognitive complexity issues reported by SonarQube. 2020-09-23 11:59:14 +05:30
Nikhil Mohite 43d97b0e6f Improve code coverage and API test cases for Functions. Fixes #5330 2020-09-22 14:43:46 +05:30
Pradip Parkale 458036ad6b Fixed an issue where the server is not able to connect using the service. Fixes #5841 2020-09-22 13:14:40 +05:30
Pradip Parkale 1ee9cddceb Ensure that the import/export feature should work with SSH Tunnel. Fixes #5739 2020-09-22 09:40:59 +05:30
Aditya Toshniwal ed3c692b1f Fixed an issue where the query tool is not fetching more than 1000 rows for the table does not have any primary key. Fixes #5845 2020-09-21 15:36:19 +05:30
Ganesh Jaybhay b0475566ca Fixed reverse engineering SQL where parenthesis is not properly arranged for View/MView definition. Fixes #5830 2020-09-21 11:05:56 +05:30
Akshay Joshi 3489f94ca7 Ensure that multiple extensions can be dropped from the properties tab. Fixes #5839. 2020-09-21 10:09:41 +05:30
Aditya Toshniwal 553be14000 Fixed an issue where a column is renamed and then removed, then the drop SQL query takes the wrong column name. Fixes #5807. 2020-09-21 09:40:45 +05:30
Aditya Toshniwal  a25e808e06 Remove maximum length on the password field in the server dialog. Fixes #5802 2020-09-17 20:21:00 +05:30
Aditya Toshniwal  bf183bdcff Change the explain plan SVG colors based on the theme. Fixed some minor color issues in the analysis tab. 2020-09-17 20:17:54 +05:30
Aditya Toshniwal  95a5b1e459 Some more accessibility fixes.
refs #5732
2020-09-17 20:16:38 +05:30
Murtuza Zabuawala  9e69e13468 Fixed typo in 'get_storage_directory' function. 2020-09-17 20:15:42 +05:30
Fred Escallier ae4924995a Update French translation. 2020-09-17 20:13:15 +05:30
Akshay Joshi 55b5080c77 Fixed and improve API test cases for the schema diff tool. Fixes #5417 2020-09-17 20:10:01 +05:30
Pradip Parkale 593d86d3f2 Ensure that the 'Remove Server Group' option is available in the context menu. Fixes #5834 2020-09-15 13:19:00 +05:30
Pradip Parkale 8e132eab08 Fixed some accessibility issues. Fixes #5732 2020-09-15 13:03:18 +05:30
Akshay Joshi 324e3e74be Fixed an issue where custom sequences are not visible when show system objects are set to false. Fixes #5833 2020-09-15 12:58:43 +05:30
Akshay Joshi 7dca844cbe Update version for release. 2020-09-14 17:53:54 +05:30
Rahul Shirsat 8029d9e65e 1) Fixed internal server error when clicking on the open new query tool button
from the View/Edit Data window. Fixes #5831
2) Fixed schema diff panel title issue on new tab.
2020-09-14 17:42:59 +05:30
Domenico Sgarbossa cea41cb4a9 Update Italian translation. 2020-09-14 16:17:00 +05:30
Akshay Joshi 5eb1c57320 1) Correct the reverse engineering SQL of the collation node for database server version < 10.
2) Added 'rngcollation' and 'attnum' in the ignore list of Types node and fixed an issue occurs due to SonarQube fix.
2020-09-14 16:12:20 +05:30
Akshay Joshi 5462aeab11 Update Dependencies. 2020-09-13 19:14:56 +05:30
Libor M a850852847 Update Czech translation. 2020-09-13 19:01:21 +05:30
Identifier Anonymous 291ee5366c Update Japanese translation. 2020-09-13 18:58:22 +05:30
Libor M a1b48d2c64 Modify babel config for javascript files. 2020-09-13 18:54:35 +05:30
Akshay Joshi 913e92a96e Update message catalogs. 2020-09-11 20:00:07 +05:30
Aditya Toshniwal b82e6dbdb8 1) Added email id validation on the login page.
2) Added validation for the file manager.
2020-09-11 19:55:19 +05:30
Nidhi Bhammar 6ded547a0d Added documentation for shared server support. Fixes #5792 2020-09-11 19:12:08 +05:30
Akshay Joshi a7d40e238e Ensure that the 'CREATE SCHEMA' statement should be present in the generated script if the schema is not present in the target database. Fixes #5816 2020-09-11 19:06:56 +05:30
Akshay Joshi ed1bd74301 Ensure that a valid error message should be displayed for an incorrect user or password. 2020-09-11 11:26:47 +05:30
Akshay Joshi 1bd0a0edf5 Remove illegal argument from trigger function in trigger DDL statement. Fixes #5779 2020-09-10 17:27:01 +05:30
Rahul Shirsat 7fac72cac5 Fixed an issue where alert message should get displayed on active browser window.
refs #4059
2020-09-10 12:09:56 +05:30
Aditya Toshniwal d0310b669e Fixed an issue where clicking on the 'Generate script' button shows a forever spinner due to pop up blocker. Fixes #5815 2020-09-09 20:10:56 +05:30
Rahul Shirsat 62e6848dc8 1) Added tooltip & keyboard shortcut for the query tool button.
2) Fixed TypeError issue.

refs #4059
2020-09-09 19:32:33 +05:30
Akshay Joshi 1bc1ef7f17 Fixed an issue where vacuum options not consider in Schema Diff. It's a regression. 2020-09-09 15:34:50 +05:30
Akshay Joshi ffb829e80c Fixed an issue while refreshing Resource Group. Fixes #5820 2020-09-09 14:34:14 +05:30
Aditya Toshniwal 796a8a013a 1) Changing the state of the react directly is not recommended, so avoid changing it directly.
2) Fixed API test cases.
2020-09-09 13:08:58 +05:30
Aditya Toshniwal 535739c0c7 Fixed cognitive complexity issues reported by SonarQube. 2020-09-09 11:25:43 +05:30
Nikhil Mohite 72f0e87367 Fixed cognitive complexity issues reported by SonarQube. 2020-09-09 11:20:17 +05:30
Nidhi Bhammar f278490540 Update the description of GIN and GiST indexes in the documentation. Fixes #5734 2020-09-08 12:04:58 +05:30
Akshay Joshi 76b0e3e9f7 Moved logic to check fixed port is in use to ConfigWindow class.
refs #5751
2020-09-08 12:00:24 +05:30
Pradip Parkale 98e86a8160 Fixed an issue where the server icon getting change to the shared server icon in desktop mode.
refs #4979
2020-09-08 10:09:16 +05:30
Pradip Parkale 9e5487d5ad Fixed SQL for Row Level Security which is incorrectly generated. Fixes #5764 2020-09-07 18:40:49 +05:30
Aditya Toshniwal 8c2e965f6e Fixed excessive CPU usage by stopping the indefinite growth of the graph dataset. Fixes #5794 2020-09-07 18:23:04 +05:30
Aditya Toshniwal f8f00b4ecf Fixed an issue in the query tool when columns are having the same name as javascript object internal functions. Fixes #5765. 2020-09-07 18:10:27 +05:30
Pradip Parkale 4da4a05611 Fixed code smell 'Remove duplicates string literals'. 2020-09-07 17:56:02 +05:30
Akshay Joshi 9ae9ccff16 Modified the logic to check Port is in use for runtime. Fixes #5751. 2020-09-03 19:21:54 +05:30
Akshay Joshi eaa90ee8eb Fixed primary key/unique constraint icon issue. 2020-09-03 18:53:40 +05:30
Khushboo Vashi 31bbdd6a12 Fixed code smell 'String literals should not be duplicated'. 2020-09-03 18:35:58 +05:30
Aditya Toshniwal 974d395a48 Fixed cognitive complexity issues reported by SonarQube. 2020-09-03 18:10:57 +05:30
Akshay Joshi a67f6e4f9c Fixed API test cases failed due to commit for #4979. 2020-09-03 14:20:45 +05:30
Akshay Joshi ed0c4037ad Fixed linter error by removing 'debugger;' keyword. 2020-09-03 13:16:08 +05:30
Pradip Parkale b562ab7681 Added shared server support for admin users. Fixes #4979 2020-09-03 12:59:28 +05:30
Yogesh Mahajan 3e35dc95e5 Improve code coverage and API test cases for Tables. Fixes #5774. 2020-09-03 12:35:56 +05:30
Akshay Joshi ddf5b33219 Added exclamation icon to alertify warning messages. 2020-09-02 17:27:26 +05:30
Akshay Joshi 1c9badec9c Rename the menu option 'Search objects' to 'Search Objects...' 2020-09-02 16:44:30 +05:30
Aditya Toshniwal 8f3bdf1cf3 Fixed cognitive complexity issues reported by SonarQube. 2020-09-02 14:39:54 +05:30
Akshay Joshi 3b9e8e47ec Modified 'cryptography' version to less than or equal to 3.0 to fix the
pgAdmin4 launch issue on Windows.

Cryptography's new version may be creating a problem. This is a temporary
fix and will have to investigate the proper fix.
2020-09-01 16:05:41 +05:30
Dave Page b85831fb5f Fix typo 2020-09-01 09:22:10 +01:00
Ganesh Jaybhay fd0ed81f7f Fixed accessibility issues for main panels. 2020-09-01 12:58:23 +05:30
Rahul Shirsat b5c299c5ad Fixed an issue where --load-server does not allow loading connections that use pg_services. Fixes #5746 2020-08-31 17:49:46 +05:30
Cyril Jouve 5a253f9053 Change the following to replace Python 2 code with Python 3:
1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
2020-08-31 16:45:31 +05:30
Aditya Toshniwal 11d5613866 Fixed RESQL test cases for Roles module. 2020-08-28 18:22:25 +05:30
Yogesh Mahajan 3984544bdb Fixed code smell 'String literals should not be duplicated'. 2020-08-28 18:17:27 +05:30
Yogesh Mahajan e226b2fa75 Adjusted the height of jobstep code block to use maximum space. Fixes #5426. 2020-08-28 14:00:49 +05:30
Rahul Shirsat e8b192be3e Added a new button to the query tool toolbar to open a new query tool window. Fixes #4059 2020-08-28 13:53:08 +05:30
Dave Page 8368eed645 Ensure that 'setup-web.sh' should work in Debian 10. Fixes #5775. 2020-08-27 19:21:21 +05:30
Aditya Toshniwal 28b637c99c Fixed RE-SQL test cases failed due to the previous commit.
Introduces a new key - replace_regex_pattern to synchronize the
expected SQL with the backend SQL based on the regex string
2020-08-27 19:08:00 +05:30
Aditya Toshniwal 53a5410337 Fixed cognitive complexity issues and added some more RESQL test cases for roles module. 2020-08-27 13:09:22 +05:30
Chethana Kumar 8222bf6420 Modified the 'Commit' and 'Rollback' query tool button icons. Fixes #5662 2020-08-27 12:58:13 +05:30
Chris Mayo 0998d349ca Fixed an issue where the application ignores the fixed port configuration value. Fixes #5773 2020-08-27 12:49:58 +05:30
Yogesh Mahajan f3bde7b5f1 Ensure that schema names starting with 'pg' should be visible in browser tree when standard_conforming_strings is set to off. Fixes #4216 2020-08-26 18:16:16 +05:30
Yogesh Mahajan 8fcf527632 Improve code coverage and API test cases for Columns and Constraints (Index, Foreign Key, Check, Exclusion). Fixes #5332 2020-08-26 12:35:22 +05:30
Dave Page 4eb17afe4e Warn the user when connecting to a server that is older than pgAdmin supports. Fixes #5772 2020-08-25 17:18:43 +01:00
Nikhil Mohite d2577e32e6 Fixed cognitive complexity issues reported by SonarQube. 2020-08-25 18:13:01 +05:30
Aditya Toshniwal e582ffca38 Fixed regression issue in taking backup of the table. Added some more test cases. 2020-08-25 18:06:38 +05:30
Akshay Joshi 59649ca42c 1) Enable the 'Configure' and 'View log' menu option when the server taking longer than usual time to start.
2) When an error occurs from the backend, the configure window opens and if the user has changed the setting
   of the port, it won't take any effect as we have retrieved the value of the port at the start of the runtime.
3) Added logic to identify the specified fixed port is already in use. Throw the error before starting the pgAdmin server.

Fixes #5751
2020-08-25 18:01:27 +05:30
Akshay Joshi e2ac6187dc Fixed Jenkins build failure due to API test case failed. 2020-08-25 14:14:48 +05:30
Akshay Joshi df9aaf19c2 Fixed string indices must be integers issue for PostgreSQL < 9.3. Fixes #5766 2020-08-25 13:38:24 +05:30
Aditya Toshniwal 275c671576 Fixed cognitive complexity issues reported by SonarQube. 2020-08-25 12:39:14 +05:30
Pradip Parkale 86bbc3a9e8 Ensure that the user should be able to drop the database even if it is connected. Fixes #5722 2020-08-25 12:37:50 +05:30
Nikhil Mohite b3d49c61a5 Fixed incorrect reverse engineering SQL for Foreign key when creating a table. Fixes #5748 2020-08-25 12:31:58 +05:30
Pradip Parkale 7f947f146c Fixed cognitive complexity issues reported by SonarQube. 2020-08-25 12:28:55 +05:30
Romulo Rodriguez e6bd085c15 Simplifies the search of the LDAP user name by adding to the user's search condition directly in the existing search filter. 2020-08-24 12:47:09 +05:30
Akshay Joshi 52d0241a17 Fixed an issue where schema diff is not working when providing the options to Foreign Data Wrapper, Foreign Server, and User Mapping. Fixes #5754 2020-08-24 12:11:09 +05:30
Neel Patel b53de0c31d Updated some more font awesome icons for v5 2020-08-21 14:15:18 +05:30
Nikhil Mohite 19491d79a5 Fixed cognitive complexity issues reported by SonarQube. 2020-08-21 13:52:05 +05:30
Akshay Joshi dd6ae193ff Replace 'fa-clock-o' with 'fa-clock' which is appropriate for font awesome v5 2020-08-21 13:44:29 +05:30
Akshay Joshi fbbbc36221 Fixed code smell 'Define a constant instead of duplicating this literal' reported by SonarQube. 2020-08-20 20:26:51 +05:30
Rahul Shirsat 7f3e8596e3 Fixed code smell 'Define a constant instead of duplicating this literal' reported by SonarQube. 2020-08-20 18:34:49 +05:30
Akshay Joshi 103b08c9c5 Define constants for preferences label to fix SonarQube issues. 2020-08-20 17:58:37 +05:30
Dave Page 99a7ada58a Cleanup a bunch of duplicated gettext calls. 2020-08-20 10:00:12 +01:00
Nikhil Mohite 6415294782 Improve code coverage and API test cases for Grant Wizard. Fixes #5344 2020-08-20 14:04:24 +05:30
Dave Page 79e6480513 Added SQL Formatter support in Query Tool. Fixes #2042 2020-08-20 13:05:00 +05:30
Khushboo Vashi cc5a7ea334 Fixed code smell 'String literals should not be duplicated'.
Create a constant.py file which contains the common Constants.
2020-08-19 14:16:02 +05:30
Nikhil Mohite 4b56962c1b Fixed cognitive complexity issues reported by SonarQube. 2020-08-19 13:41:53 +05:30
Yogesh Mahajan 0668a52c6b Fixed following SonarQube issues:
1. String literals should not be duplicated.
 2. Cognitive Complexity of functions should not be too high.
2020-08-19 13:22:17 +05:30
Akshay Joshi 89e2f09b84 Ensure that 'bcrypt' version should be less than or equal to 3.1.7 as the new version supports Python 3.6 and above. 2020-08-18 17:59:06 +05:30
Dave Page 0fd9ee06bd Fix typo 2020-08-18 11:15:24 +01:00
Libor M 3f73516f8c Update Czech translation. 2020-08-17 17:53:55 +05:30
Akshay Joshi e3b1ef0b80 Update version for release. 2020-08-17 17:29:19 +05:30
Khushboo Vashi ae18b9a0ac Fixed schema diff issue when selecting any identical node. 2020-08-17 17:26:58 +05:30
Akshay Joshi b0af385ea0 Fixed an issue where the entire logs is in red text when the user runs backup and restore. Fixes #5604 2020-08-17 17:23:30 +05:30
Yogesh Mahajan 0122cf9aac Fixed feature test failure due to updating font-awesome from v4 to v5. 2020-08-17 12:31:19 +05:30
Akshay Joshi 085a4f4abf Update Dependencies. 2020-08-17 11:56:23 +05:30
Fred Escallier ad0bcba99e Update French translation. 2020-08-17 11:31:01 +05:30
Identifier Anonymous 7a05edc42a Update Japanese translation. 2020-08-17 11:27:24 +05:30
Domenico Sgarbossa d2f93d6fad Update Italian translation. 2020-08-17 11:23:32 +05:30
Akshay Joshi 1466e414ec Update message catalogs. 2020-08-14 17:26:42 +05:30
Akshay Joshi 8f61944386 1) Added special handling for the extension to resolve the dependency.
2) Added 'is_sys_obj' to the ignore list of Schema Diff.
3) Font awesome v5 fixes.
2020-08-13 17:48:04 +05:30
Akshay Joshi 63df19ee1c Fixed following schema diff issues:
1) Avoid template databases from the Database drop-down list.
 2) Exclude system schemas while comparing two databases.
 3) Escape group name for XSS.
2020-08-13 14:12:37 +05:30
Nikhil Mohite 93adf6884f Upgrade font awesome from v4 to v5. Fixes #5731 2020-08-13 12:04:00 +05:30
Cyril Jouve 36574b25b6 The 'str' object never has attribute decode in Python3, so remove the dead code. 2020-08-12 18:55:35 +05:30
Akshay Joshi 26506a9727 Fix PEP8 2020-08-12 17:48:08 +05:30
Aditya Toshniwal caeea7940a Fixed errors occurring when saving preferences, regression of SonarQube fixes. 2020-08-12 17:42:53 +05:30
Khushboo Vashi 5b688cf949 Resolve schema diff dependencies by selecting the appropriate node automatically and maintain the order in the generated script. Fixes #5730 2020-08-12 17:36:48 +05:30
Aditya Toshniwal 7dd313f5fc Fixed an issue where debugger doesn't work if the search path is set other than 'public'. Fixes #4123 2020-08-12 14:24:40 +05:30
Yogesh Mahajan 1f70385a4e Fixed an issue where conversion of bytea to the binary string results in an error. Fixes #5567 2020-08-11 15:31:14 +05:30
Aditya Toshniwal 8129df42da Fixed cognitive complexity issues reported by SonarQube. 2020-08-11 15:13:35 +05:30
Akshay Joshi 082b968bbc Fixed following schema diff issues:
1) Wrong SQL generated for the columns having different data type.
  2) Added 'castfunc' in the ignore list.
2020-08-11 14:42:32 +05:30
Rahul Shirsat 2907a79dd7 Added missing comments in reverse engineering SQL for each column of a View. Fixes #3791 2020-08-11 11:30:47 +05:30
Akshay Joshi 46af290b85 Fixed API test cases for packages. 2020-08-10 18:13:00 +05:30
Aditya Toshniwal 26a758a0d6 Fixed an issue where copying and pasting a cell with multiple line data
will result in multiple rows. Fixes #5526

Fixed an old issue where quotes are not escaped when copying the cells.
As per CSV standards, if the string is in double quotes and there are
double quotes inside the string then they should be escaped with extra double-quotes.
2020-08-10 16:53:32 +05:30
Nikhil Mohite 9d006d0ec5 Fixed cognitive complexity issues reported by SonarQube. 2020-08-10 16:30:07 +05:30
Cyril Jouve 7a0bfecfc5 Use Python3 'ipaddress' module to validate the IPv4 and IPv6 addresses. 2020-08-10 15:57:25 +05:30
Rahul Shirsat 604937cf66 Fixed an issue where 'ALTER VIEW' statement is missing when the user sets the default value of a column for View. Fixes #5664 2020-08-10 15:27:57 +05:30
Akshay Joshi 4f74609ecf Modified schema diff tool to compare two databases instead of two schemas. Fixes #5126 2020-08-10 15:13:34 +05:30
Yogesh Mahajan  3672013ddc Fixed an issue where the error message does not have a close button on utility dialogs. Fixes #5670 2020-08-07 17:17:51 +05:30
Nikhil Mohite  9ad7476a34 Corrected DROP SQL syntax for catalog. Fixes #5713 2020-08-07 16:58:38 +05:30
Pramod Ahire 23a12efd29 Added make file target for the coverage of JS files. 2020-08-07 16:36:48 +05:30
Akshay Joshi 518b13c779 Added the 'ORDER BY' clause for the privileges type to fix schema diff issue. Fixes #5689 2020-08-07 16:30:03 +05:30
Dave Page d9c20de31f Clarify some of the differences when running in server mode in the docs. Fixes #5724 2020-08-07 10:07:28 +01:00
Aditya Toshniwal d6400bbcae Replace the generic exception class with a more specific one. 2020-08-07 12:37:00 +05:30
Pramod Ahire 68a5027d15 Added ability to generate code coverage reports for java script files. 2020-08-07 12:27:12 +05:30
Akshay Joshi 48ec4085d2 Update the sshtunnel version to v0.1.5.
refs #4361
2020-08-06 17:17:27 +05:30
Aditya Toshniwal e494b1520d Fixed an issue where ajax call continues to fire even after disconnect the database server. Fixes #5716 2020-08-06 16:52:16 +05:30
Akshay Joshi aac0da4cbc Fixed ssh tunnel hang issue when the user tries to disconnect the server. Fixes #4361 2020-08-06 16:16:37 +05:30
Yogesh Mahajan  48737e6a02 Fixed code smell 'String literals should not be duplicated' reported by SonarQube. 2020-08-06 12:42:19 +05:30
Nikhil Mohite  1122e06f48 Fixed cognitive complexity issues reported by SonarQube. 2020-08-06 12:38:35 +05:30
Yogesh Mahajan e3dfe03a2a Fixed an issue where the user is not able to insert the data if the table and columns name contains special characters. Fixes #4387 2020-08-06 12:30:10 +05:30
Nikhil Mohite 6a406f466d Fixed cognitive complexity issues reported by SonarQube. 2020-08-05 13:00:44 +05:30
Aditya Toshniwal aa679e06b2 Replace the generic exception class with a more specific one to fix SonarQube issues. 2020-08-05 12:41:28 +05:30
Murtuza Zabuawala d2621282dc Change the scope of '.dashboard-graph-body' CSS class to prevent it from affecting other places. 2020-08-05 12:30:09 +05:30
Akshay Joshi 5ce2773658 Ensure that the Dictionaries drop-down shows all the dictionaries in the FTS configuration dialog. Fixes #5429 2020-08-04 15:48:20 +05:30
Yogesh Mahajan 43e127de31 Ensure that the original file format should be retained when saving the same file in SQL editor. Fixes #3767 2020-08-03 13:18:04 +05:30
Akshay Joshi 87d08de3a0 Corrected the syntax as per jinja standards. refs #5632 2020-08-03 13:08:29 +05:30
Aditya Toshniwal 536593bf8a Fixed following SonarQube issues:
- Remove this assignment to the local variable, the value is never used.
  - Rename local variables to match the regular expression
  - Add logic to this except clause or eliminate it and rethrow the exception automatically.
  - Rename fields to match the regular expression
  - Extract this nested conditional expression into an independent statement.
  - Change this default value to "None" and initialize this parameter inside the function/method.
  - Update this function so that its implementation is not identical to __repr__
  - Refactor this method to not always return the same value
  - Reraise this exception to stop the application as the user expects
  - Add missing parameters _w _PY3. This method overrides simplejson.decoder.JSONDecoder.decode.
  - Remove this redundant continue.
  - Remove this unused function declaration
  - Remove this identity check; it will always be False.
2020-08-03 12:59:51 +05:30
Nikhil Mohite eb2c554601 Fixed cognitive complexity issues reported by SonarQube. 2020-08-03 12:46:34 +05:30
Satish V 318d712c4f Improve code coverage and API test cases for Schemas. Fixes #5327 2020-08-03 12:38:38 +05:30
Shubham Agarwal 32d904058a Fixed SonarQube issues. 2020-08-03 11:44:27 +05:30
Aditya Toshniwal 56cf64ad22 Fixed following SonarQube issues:
- Refactor functions to not always return the same value.
  - Rename "cls" to "self" or add the missing "self" parameter.
  - Remove useless assignment to variables.
2020-07-30 14:04:22 +05:30
Akshay Joshi dd7eb54e90 Fixed an issue when comparing the table with a trigger throwing error in schema diff. Fixes #5710 2020-07-30 13:57:00 +05:30
Nikhil Mohite 89fa85d650 Fixed cognitive complexity issues reported by SonarQube. 2020-07-29 18:29:04 +05:30
Akshay Joshi 099fea15ae Fixed code smells in runtime code reported by SonarQube. 2020-07-29 18:26:41 +05:30
Rahul Shirsat 74fd5dfe96 Ensure that the user will be able to modify the start value of the Identity column. Fixes #5632 2020-07-29 16:22:11 +05:30
Satish V 287a6628ed Improve code coverage and API test cases for Types. Fixes #5336 2020-07-29 15:41:04 +05:30
Akshay Joshi 510dd5c047 1) Fixed pgAdmin hang issue when the user clicks on 'View Log' menu option.
2) Fixed some code smell in runtime code.
2020-07-29 15:31:38 +05:30
Aditya Toshniwal f715373218 Replace charting library Flotr2 with ChartJS using React. Fixes #3904 2020-07-29 14:49:22 +05:30
Dave Page 5820b9521e Make sure the version check is compatible with older versions of Qt 2020-07-29 09:36:27 +01:00
Dave Page 6fc6ec1cda Correct TLS certificate filename in the container deployment docs. Fixes #5708 2020-07-29 09:26:12 +01:00
Aditya Toshniwal a0893fe43b Fixed code smell 'variable shadows a builtin' reported by SonarQube. 2020-07-28 16:20:26 +05:30
Dave Page 46ba0310fa Make the runtime configuration dialog non-modal. Fixes #5490
Major refactoring of the runtime code, Specifically:
  - Move the bulk of the core code from main() into a new Runtime class.
  - Break up the mass of code that was main() into a number of relatively simple functions.
  - Make the Configuration dialog synchronous so the Log dialog can be properly viewed.
  - Enable/disable menu options at the right time.
  - Remove support for Qt < 5.0.
  - Remove the application name constant and hardcode the name to simplify the code.
  - Improve log messages.
  - Replace the sdbm hashing with Qt's MD5 hashing.
2020-07-28 16:13:05 +05:30
Akshay Joshi ed0dc62b69 Fixed incorrect import statement for urlopen.
refs #5700
2020-07-27 17:33:44 +05:30
Akshay Joshi fb0bc65ced Fixed following SonarQube issues:
1) Define a constant instead of duplicating this literal.
  2) Reduce cognitive complexity (Patch by Aditya)
2020-07-27 16:31:03 +05:30
Dave Page f57558fdb2 Add a --yes command line option to setup-web.sh to allow non-interactive use. Fixes #5610. 2020-07-27 06:29:01 -04:00
Cyril Jouve f93cfe8c4c Remove old Python 2 compatibility code. Fixes #5700 2020-07-27 11:03:13 +01:00
Akshay Joshi 7a22cff28c Fixed 'cannot unpack non-iterable Response object' issue. 2020-07-24 14:59:50 +05:30
Yogesh Mahajan 043025d1eb Fixed an issue where the user is not able to save the new row if the table is empty. Fixes #4810 2020-07-24 14:30:22 +05:30
Satish V 4cf8c2f300 Improve code coverage and API test cases for Foreign Servers and User Mappings. Fixes #5324 2020-07-24 14:14:13 +05:30
Rahul Shirsat 937877e841 Ensure that RLS Policy node should be searchable using search object. Fixes #5646 2020-07-24 13:47:39 +05:30
Yogesh Mahajan dd27e08a98 Fixed code smell 'Unused local variables should be removed'. 2020-07-24 12:15:29 +05:30
Nikhil Mohite 1fbf298d30 Fixed cognitive complexity issues reported by SonarQube. 2020-07-24 12:03:05 +05:30
Aditya Toshniwal 505a3ac960 1) Fixed cognitive complexity issues reported by SonarQube.
2) Fixed code smell 'Add a nested comment explaining why this method is
   empty, or complete the implementation'.
2020-07-24 11:46:30 +05:30
Dave Page 310450cfa7 Fix typo. 2020-07-22 10:11:04 +01:00
Nikhil Mohite 5f619ae40a Ensure that data output color is readable on row selection. Fixes #5687 2020-07-21 18:54:06 +05:30
Pradip Parkale 28a4359020 Fixed issue where the user was not able to update policy if the policy is created with space. Fixes #5686 2020-07-21 18:14:49 +05:30
Akshay Joshi f177d54f21 Fixed AttributeError while creating the server group. Fixes #5688 2020-07-21 18:02:51 +05:30
Libor M 851c15b2d6 Update Czech translation. 2020-07-21 17:23:13 +05:30
Akshay Joshi c0e30c93e5 Update version for release. 2020-07-20 16:18:36 +05:30
Khushboo Vashi 645517d22d Added support for LDAP anonymous binding. Fixes #5650 2020-07-20 15:30:06 +05:30
Nikhil Mohite 3983e2c13c Fix the following issues for High Contrast Theme:
1) Schema diff compare button icon is not visible on hover.
  2) Schema diff for identical section text is not readable due to the same color as the background.
  3) Removed extra variables used for set text color for explain - Analysis section (Issue related dark theme.). 
  4) Issue related to the disabled toggle button.

refs #5653
2020-07-20 15:12:46 +05:30
Identifier Anonymous f29db1a9cd Update Japanese translation. 2020-07-20 12:08:50 +05:30
Fred Escallier c723b4584c Update French translation. 2020-07-20 12:04:47 +05:30
Domenico Sgarbossa b75c09d7c0 Update Italian translation. 2020-07-20 12:02:46 +05:30
Yogesh Mahajan 225c3e8f7e Fixed feature tests 2020-07-20 11:59:28 +05:30
Nikhil Mohite 7edcca9b07 Added High Contrast theme support. Fixes #5653
Fixed text color issue in explain analyze for the Dark theme. Fixes #5677
2020-07-20 11:51:21 +05:30
Dave Page 9174db2024 Fix typo. 2020-07-18 07:30:06 +01:00
Dave Page 69e2ec806b Fix PEP-8 issue. 2020-07-17 18:03:31 +01:00
Dave Page 04ce8b2c71 Include LICENSE and DEPENDENCIES [inventory] files in official packages. Fixes #5577
Whilst passing, rename libraries.txt to DEPENDENCIES and update the list of static packages.
2020-07-17 17:06:16 +01:00
Akshay Joshi 2bfb7c20c8 Update message catalogs. 2020-07-17 18:02:50 +05:30
Dave Page fb2178e5d3 Support configuration files that are external to the application installation. Fixes #5235 2020-07-17 17:54:12 +05:30
Nikhil Mohite 4e2c4b0498 Fixed cognitive complexity issues reported by SonarQube. 2020-07-17 15:31:04 +05:30
Dave Page 13d2f9131d Replace the runtime themes with ones that don't have sizing issues. Fixes #5554 2020-07-17 15:31:04 +05:30
Satish V 64cdd509b0 Fixed save button enable issue when focusing in and out of numeric input field. Fixes #5137 2020-07-17 15:31:04 +05:30
Aditya Toshniwal bd15d2d0f7 Fixed CSRF errors when pgAdmin opened in an iframe on safari browser. Fixes #5675 2020-07-17 15:31:04 +05:30
Dave Page 64f5253bd3 Fix typo 2020-07-17 09:20:17 +01:00
Aditya Toshniwal 9d0f3ce90b Fixed code smell 'potential hiding of variables declared in an outer scope'. 2020-07-16 19:53:39 +05:30
Akshay Joshi 703faf3b15 Fixed following SoanrQube issues
1) Rename field "node_type" to prevent any misunderstanding/clash with field "NODE_TYPE" defined.
  2) Define a constant instead of duplicating this literal.

Solution:
  1) Rename the field "NODE_TYPE" and "COLLECTION_LABEL" to "_NODE_TYPE" and "_COLLECTION_LABEL"
  2) Declare the constant in PGChildNodeView for SQL files.
2020-07-16 19:39:55 +05:30
Akshay Joshi 5d8c79da38 Added docstrings for some newly created functions. 2020-07-15 18:07:54 +05:30
Satish V 522ddad72b Fixed code smell 'Variables should not be shadowed'. 2020-07-15 15:03:47 +05:30
Akshay Joshi 11c4877859 Fixed an issue where difference DDL is showing the wrong SQL when changing the policy owner. Fixes #5647 2020-07-15 14:52:14 +05:30
Akshay Joshi 2469032f15 Fixed an issue where fetching the schema throws an error if the database
is not connected in Schema Diff. Fixes #5673

Maintenance Database is selected by default in Schema Diff.
2020-07-15 13:07:28 +05:30
Khushboo Vashi bd9dc97b4f Fixed code smell 'Functions, methods, and lambdas should not have too many parameters' reported by SonarQube. 2020-07-14 19:23:50 +05:30
Rahul Shirsat d6893f9d8a Fixed reverse engineered SQL for partitions when storage parameters are specified. Fixes #5569. 2020-07-14 19:16:33 +05:30
Akshay Joshi 4f34bc0f0e Added missing dependencies/dependent and corrected some wrongly identified. Fixes #5666 2020-07-14 18:34:50 +05:30
Satish V a91e4d8a7f Improve code coverage and API test cases for Foreign Data Wrapper. Fixes #5323. 2020-07-14 15:58:22 +05:30
Aditya Toshniwal 161c9b0fc7 Fixed code smell 'Variables should not be shadowed'.
Fixed all the duplicate CSS blocks issues raised by SonarQube.
2020-07-14 15:45:01 +05:30
Nikhil Mohite 0013a3b047 Fixed cognitive complexity issues reported by SonarQube. 2020-07-14 15:33:54 +05:30
Ashesh Vashi 1889c256e1 Fixed a typo in the psycopg2 driver in fetching result with
'execute_scalar' while attempting to reconnect.
2020-07-13 22:45:01 +05:30
Dave Page 9113932066 Tweak the OpenSSL build instructions. 2020-07-13 13:36:56 +01:00
Akshay Joshi d3eaac8609 Reverted fix for #5569 due to a couple of issues. 2020-07-11 20:32:57 +05:30
Dave Page e6edf40048 Refactor server request code by removing some duplicated code in the runtime and improves some of the debug logs. 2020-07-11 16:59:26 +05:30
Dave Page dd38fed6e0 Use ISO8601 date format in the runtime startup log. 2020-07-11 16:47:36 +05:30
Dave Page 5ac656c638 Refactor config loading/saving for the runtime config dialog to avoid code duplication. 2020-07-11 16:41:31 +05:30
Dave Page 6855ac1d5e Use QStandardPaths::AppLocalDataLocation in the runtime to determine where to store runtime logs. Fixes #5414 2020-07-11 16:32:08 +05:30
Rahul Shirsat 29175d7ec4 Fixed reverse engineered SQL for partitions when storage parameters are specified. Fixes #5569 2020-07-11 16:23:31 +05:30
Yogesh Jain 92858e40bf Ensure that closing the alert box on the login page will close multiple alert boxes if opened. 2020-07-10 11:49:49 +05:30
Rahul Shirsat e8b81db977 Fixed cognitive complexity issues reported by SonarQube. 2020-07-10 11:44:33 +05:30
Nikhil Mohite 7420673a0f Improve code coverage and API test cases for FTS Configuration, FTS Parser, FTS Dictionaries, and FTS Template. Fixes #5329. 2020-07-10 11:40:08 +05:30
Aditya Toshniwal 357a9179b1 Fixed convention related issues reported by SonarQube. 2020-07-09 18:55:33 +05:30
Yogesh Mahajan 2cefa9afca Fixed code smell 'Variables should not be shadowed'. 2020-07-09 18:44:58 +05:30
Nikhil Mohite e1168f8de0 Fixed code smell to reduce cognitive complexity. 2020-07-09 18:41:13 +05:30
Satish V 290cf8271b Fixed code smell 'Variables should not be shadowed'. 2020-07-09 18:35:04 +05:30
Pradip Parkale 916182f80f Fixed code smell for variable naming convention. 2020-07-09 18:28:08 +05:30
Murtuza Zabuawala 2db9242f5c Fixed accessibility issue where few dialogs are not rendering properly
when we zoomed in browser window 200% and screen resolution is low.

Fixes #5662
2020-07-09 18:18:37 +05:30
Yogesh Mahajan 3c08e618bd Fixed an issue where CSV download quotes numeric columns. Fixes #5463 2020-07-09 18:11:46 +05:30
Pradip Parkale c58fda0a70 Ensure that create RLS Policy menu should not be visible for catalog objects. Fixes #5633 2020-07-09 18:04:32 +05:30
Akshay Joshi b4c25bdc0a Fixed code smell 'Functions, methods, and lambdas should not have too many parameters' reported by SonarQube. 2020-07-07 19:39:06 +05:30
Pradip Parkale 36a2c073bd Added support for permissive/restricted policy type while creating RLS Policy. Fixes #5622 2020-07-07 17:55:05 +05:30
Yogesh Mahajan 776bec0d82 Fixed following SoanrQube issues:
1) Variables should not be shadowed.
  2) Variables and functions should not be redeclared.
2020-07-07 16:25:46 +05:30
Satish V ab2dc60097 Fixed the SoanrQube code smell 'Variables should not be shadowed'. 2020-07-07 16:18:18 +05:30
Nikhil Mohite aee6bac5ef Fixed cognitive complexity code smell reported by SonarQube. 2020-07-07 15:19:47 +05:30
Khushboo Vashi 58b4c45d0c Added support for LDAP authentication with different DN by setting the dedicated user for the LDAP connection. Fixes #5484 2020-07-06 19:35:55 +05:30
Pramod Ahire a6ce78a8c0 Fixed SonarQube issues in css/scss files. 2020-07-06 19:11:43 +05:30
Satish V 2ebf203412 Fixed issue of error message not getting displayed when filename is empty for backup, restore, and import/export. Fixes #3814. 2020-07-06 19:04:26 +05:30
Aditya Toshniwal 45a03dd663 Fixed 'convention' related code smell reported by SonarQube. 2020-07-06 11:48:23 +05:30
Satish V fcf720a5d8 Fixed code smell 'Variable should not be shadowed' 2020-07-06 11:31:36 +05:30
Murtuza Zabuawala cb1cdd1b23 Modified EPAS templates to support schema restriction. 2020-07-03 18:42:17 +05:30
Akshay Joshi 0d92059155 Fixed code smells having rule 'Functions, methods and lambdas should not have too many parameters'. 2020-07-03 18:37:37 +05:30
Yogesh Mahajan 80ab596992 Fixed the SoanrQube code smell 'Variables should not be shadowed'. 2020-07-03 14:33:30 +05:30
Khushboo Vashi b5f0190799 Fixed the SonarQube Code smells having Rule 'Functions, methods and lambdas should not have too many parameters'. 2020-07-03 14:24:54 +05:30
Aditya Toshniwal 3d5a2046c4 Fixed jasmin test cases failed due to last commit. 2020-07-03 12:57:53 +05:30
Aditya Toshniwal 341c3aded6 Fixed dark theme-related CSS and modify the color codes. Fixes #5287
Fixed backgrid row hover issue where on hover background color is set for edit and delete cell only. Fixes #5470
2020-07-03 11:47:40 +05:30
Aditya Toshniwal dd4dc19add Fixed issue where dialog sizes snapping to the default widths. 2020-07-03 11:26:06 +05:30
Nikhil Mohite 1ab257d512 Fixed Cognitive Complexity code smell reproted by SonarQube. 2020-07-03 11:15:41 +05:30
Nikhil Mohite 2ec8051303 Remove the duplicate code for tab indent and add the logic into codemirror. 2020-07-03 10:47:39 +05:30
Akshay Joshi ec30e6ace7 Comment out the 'yarn audit' command to fix the vulnerability found in the 'lodash' package. No fix is currently available. 2020-07-02 16:21:56 +05:30
Aditya Toshniwal ced296939f Fixed an issue where the user is able to edit properties when some of the collection nodes are selected. Fixes #5629 2020-07-02 16:21:56 +05:30
Yogesh Mahajan 1802f8a3f8 Ensure that the referenced table should be displayed on foreign key constraints. Fixes #5530 2020-07-02 16:21:56 +05:30
Pradip Parkale 8b10315e2a Added hints for 'Using' and 'With check' options of RLS Policy node. 2020-07-02 16:21:56 +05:30
Dave Page e0fa4a6cb2 Fix typo. Fixes #5517 2020-07-02 09:32:31 +01:00
Ashesh Vashi 1366dd1fcd Show horizontal scrollbar when needed in the menubar in the lower
resolution, when navbar button is visible.

Added appropriate CSS in the .navbar-collapse class to show scrollbar
in screen resolution (992px widith)
2020-07-02 11:21:23 +05:30
Akshay Joshi 0850db2a9b Fixed database connection issue, regression of SonarQube fixes. 2020-07-01 17:32:22 +05:30
Akshay Joshi a881e4e3f8 Fix PEP8 2020-07-01 15:33:51 +05:30
Nikhil Mohite 192a446131 Fixed API test cases failing due to updating the server manager instance. 2020-07-01 15:29:59 +05:30
Pradip Parkale b30c590866 Fixed SonarQube code smell 'Rename function and variable name to match the regular expression'. 2020-07-01 13:50:51 +05:30
Yogesh Mahajan 6dd3ca31be Fixed SonarQube code smell 'Variables should not be shadowed'. 2020-07-01 13:43:00 +05:30
Nikhil Mohite c2e875d54b Fixed tab indent issue on a selection of lines is deleting the content when 'use spaces == true' in the preferences. Fixes #4235 2020-07-01 13:34:48 +05:30
Pradip Parkale 979f806161 1) Added RLS Policy support in Schema Diff. Fixes #5601
2) Fixed 'cant execute empty query' issue when remove the value of
   'USING' or 'WITH CHECK' option of RLS Policy. Fixes #5631
2020-07-01 12:44:28 +05:30
Ashesh Vashi 3102a8d24b Fix the dialog size when zoom level is changed of the browser.
The screen.width & screen.height does not reflect the values of the
height and width respectively when zoom level is changed for the
browser. It is better to review the calculated height and width based
on the window.innerHeight and window.innerWidth and re-evaluate them.
2020-07-01 11:49:43 +05:30
Ashesh Vashi 21d57b1f10 Do not let browser autocomplete the password field while connecting a
database server.

Set the autocomplete attribute of the password field to 'new-password'
to let browser know, we require a new password for the password, and do
not autocomplete it.
2020-07-01 11:26:52 +05:30
Nikhil Mohite c873218c32 Added support for schema level restriction. Fixes #5583
Allow user to edit the connection properties when the database server
is already connected.
2020-06-30 19:15:23 +05:30
Satish V 4c05287677 Fixed SonarQube code smell 'Variables should not be shadowed'. 2020-06-30 17:26:18 +05:30
Nikhil Mohite 6713bc068b Fixed SonarQube code smells 'Refactor this function to reduce its Cognitive Complexity'. 2020-06-30 17:06:55 +05:30
Akshay Joshi 46d26cd029 Remove extra brackets from reverse engineering SQL of RLS Policy. Fixes #5621 2020-06-30 16:11:02 +05:30
Zhang Jie 88db5ec4d5 Remove extra brackets from reverse engineering SQL of trigger. 2020-06-30 16:07:55 +05:30
Akshay Joshi 102d6e7a9a Fixed an issue where panels get disappeared. Regression of SonarQube fix. 2020-06-29 14:05:07 +05:30
Rahul Shirsat 7add777b21 Add proper indentation to the code while generating functions, procedures, and trigger functions. Fixes #3851 2020-06-29 12:36:28 +05:30
Paresh More 2db518c9c6 Fixed an issue where installation of pgadmin4 not working on 32-bit Windows. Fixes #5630 2020-06-29 10:22:04 +05:30
Akshay Joshi b91f6f0f5c Fixed an issue where the semicolon is misplaced in RLS Policy SQL.
Fixed one regression issue introduced by renaming the method 'gc' to 'gc_timeout'.
2020-06-26 19:24:54 +05:30
Nikhil Mohite 115657a465 Fixed following SonarQube issues:
1) Refactor function to reduce its Cognitive Complexity.
 2) Rename variable to match the regular expression ^[_a-z][a-z0-9_]*$.
2020-06-26 15:03:50 +05:30
Satish V 8e28e0a32b Improve code coverage and API test cases for Domain and Domain Constraints. Fixes #5326 2020-06-26 14:15:09 +05:30
Satish V 830ac1cc91 Fixed following SonarQube issues:
1. Method/Field names should comply with a naming convention.
 2. Conditionals should start on new lines
2020-06-26 13:32:45 +05:30
Pradip Parkale 5206dafb35 Fixed code smells having rule 'Rename class name to match the regular expression'. 2020-06-26 13:23:23 +05:30
Khushboo Vashi c7a16a4bd5 Fixed code smells having rule 'Nested blocks of code should not be left empty'. 2020-06-26 13:18:27 +05:30
Yogesh Mahajan 707ff450b5 Fixed following SonarQube issues:
1. Boolean checks should not be inverted.
2. The comma operator should not be used.
3. Arguments to built-in functions should match documented types.
4. Redundant pairs of parentheses should be removed.
5. A conditionally executed single line should be denoted by indentation, 
6. A while loop should be used instead of a 'for' loop.
2020-06-26 13:12:07 +05:30
Diego Augusto Molina 6a63279396 Ensure that the OWNER should be quoted for foreign tables, procedures, and trigger functions. 2020-06-26 12:28:36 +05:30
Aditya Toshniwal d3b3d07f2e Fixed SonarQube issues with the tag unused. All the unused variables, assignments, code comments are fixed. 2020-06-25 11:09:43 +05:30
Satish V a1fd9ea3ce Fixed issue related to extra semicolons and function naming convention reported by SonarQube. 2020-06-24 16:16:12 +05:30
Nikhil Mohite db9d684524 Fixed 'Rename local variable to match the regular expression' issue reported by SonarQube. 2020-06-24 16:08:14 +05:30
Akshay Joshi 15c621b1d8 Fixed following SonarQube issues:
1) TypeError can be thrown as <variable_name> might be null or undefined here.
2) Unexpected duplicate "white-space".
3) Unexpected missing generic font family.
4) Unexpected shorthand "padding" after "padding-left".
2020-06-24 15:57:01 +05:30
Yogesh Mahajan cdf1c7a2a6 Fixed parallel test execution failure by handling slowness when multiple sessions are logged in concurrently. 2020-06-23 18:43:54 +05:30
Akshay Joshi d265ed9729 Fixed an issue while creating RLS Policy with the name having space. Fixes #5620 2020-06-23 14:28:21 +05:30
Akshay Joshi 18b3cc2683 Initialize pointer variables with Q_NULLPTR. 2020-06-23 14:23:28 +05:30
Murtuza Zabuawala c064eb0795 Fix an issue where RLS Policy dialog help is not working. 2020-06-23 14:13:08 +05:30
Akshay Joshi c2268c82ee Update version for release. 2020-06-22 17:42:46 +05:30
Yogesh Mahajan caebdcfa91 Ensure that the query tool should display the proper error message while terminating the active session. Fixes #3591 2020-06-22 17:09:10 +05:30
Pradip Parkale 6012f49919 Added policy event 'ALL' in events drop-down list. 2020-06-22 17:09:10 +05:30
Yogesh Mahajan d2f4a62bf3 Documentation of Row Level Security Policies. Fixes #5581 2020-06-22 17:09:10 +05:30
Paresh More 9d25973a77 Disallow installation of the 32 and 64 bit builds at the same time on Windows. 2020-06-22 12:15:32 +01:00
Yogesh Mahajan 34fbe756e8 1) Fixes parallel test execution failures.
2) Added capability to pass browser-name via command line for parallel execution.
2020-06-22 13:05:13 +05:30
Satish V daad16ea93 Fixed issue related to reducing the if-else statement to single return expression. Reported by SonarQube. 2020-06-22 12:58:48 +05:30
Aditya Toshniwal 6620f9263d Fixed issues reported by SonarQube with tag 'bad-practice'. 2020-06-22 12:18:59 +05:30
Identifier Anonymous 9e40995ab0 Update Japanese translation. 2020-06-22 11:58:15 +05:30
Domenico Sgarbossa ecdd95d15a Update Italian translation. 2020-06-22 11:55:32 +05:30
Aditya Toshniwal d6b22f1f4c Fixed an issue where the search object is unable to locate inherited tables and constraint filters are not working. Fixes #5492 2020-06-22 11:53:00 +05:30
Akshay Joshi 7ce7808093 Update message catalogs. 2020-06-19 18:01:32 +05:30
Akshay Joshi 2395075b7c Update library inventory. 2020-06-19 18:00:00 +05:30
Akshay Joshi bc24e3643f More code cleanup for SonarQube. 2020-06-18 16:20:34 +01:00
Yogesh Mahajan 6d3f13076f Fixed 'Comma operator should not be used' issue reported by SonarQube. 2020-06-18 16:17:55 +05:30
Satish V 905be1d894 Replace if-then-else statement by a single return statement, issue reported by SonarQube. 2020-06-18 15:51:01 +05:30
Aditya Toshniwal a278e8b1e6 Fixed the master password issue, introduced in the last commit. 2020-06-18 15:38:38 +05:30
Aditya Toshniwal f0490a54b7 Fixed redundant tagged issue reported by SonarQube. 2020-06-18 11:14:56 +05:30
Akshay Joshi 5ed1e1e5b6 Fixed some sonarqube issues. 2020-06-17 19:30:56 +05:30
Aditya Toshniwal df05efd7d9 Fixed vulnerabilities and few design suspicions where two conditional structures are having the same implementation. 2020-06-17 17:15:09 +05:30
Yogesh Mahajan 7c12ade161 Fixed issue related to shadowing variables reported by SonarQube. 2020-06-17 17:08:23 +05:30
Akshay Joshi cb268075c2 1) Added option to ignore the whitespaces while comparing objects in schema diff. Fixes #5468
2) Added server group name while selecting servers in schema diff. Fixes #5500
3) Fixed an issue where two identical tables showing different by schema diff tool. Fixes #5584
2020-06-17 16:27:51 +05:30
Dave Page 9f5e8962b5 Correct function naming. 2020-06-17 11:54:33 +01:00
Dave Page 6525f25a22 Correct URL and versions. 2020-06-17 11:51:11 +01:00
Dave Page aa15d2a7e2 Cleanup some variable naming. 2020-06-17 11:34:03 +01:00
Dave Page 1ca9912987 Cleanup some duplicated styles. 2020-06-17 11:31:07 +01:00
Satish V d43518cb3c Fixed following issues reported by SonarQube:
1) Replace this if-then-else statement by a single return statement. (clumsy)
2) 'switch' statements should have at least 3 'case' clauses. (bad practice)
2020-06-16 15:00:51 +05:30
Akshay Joshi cf64e2c97c Fixed runtime issues reported by SonarQube. 2020-06-16 14:53:40 +05:30
Aditya Toshniwal 3e00fe2b0f Fixed vulnerabilities and few design suspicions where two conditional structures are having the same implementation. Reported by SonarQube 2020-06-16 11:14:57 +05:30
Yogesh Mahajan 2ae5c0ec4f Fixed an issue where select all checkbox only selects the first 50 tables. Fixes #4226 2020-06-16 11:05:10 +05:30
Yogesh Mahajan 697f4aec95 Fixed issue related to shadowing variables reported by SonarQube. 2020-06-16 10:47:40 +05:30
Nikhil Mohite 023a1f222f Remove duplicate properties in CSS and few js standard fixes reported by SonarQube. 2020-06-15 17:15:15 +05:30
Akshay Joshi a21e6448ce Fixed RESQL test cases, regression of RLS policy. 2020-06-15 17:10:25 +05:30
Satish V eb1b17b636 Fix 'expressions evaluated to true/false always' issue reported by SonarQube. 2020-06-15 16:50:07 +05:30
Mishika Singh 38cd3327f3 Ensure that pgadmin should be able to connect to the server which has password more than 1000 characters. Fixes #5592 2020-06-15 16:50:07 +05:30
Khushboo Vashi 8ab358ccec Fix following issues reported by SonarQube:
1) Properties of variables with "null" or "undefined" values should not be accessed
2) Variables should not be self-assigned
3) "in" should not be used with primitive types
2020-06-15 16:50:07 +05:30
Aditya Toshniwal 641f7bbe9d Some clumsy coding related fixes reported by SonarQube. 2020-06-15 16:50:07 +05:30
Akshay Joshi a23fad0ba8 Tidy up some code to keep SonarQube happy. 2020-06-15 12:12:19 +01:00
Pradip Parkale 18277543b6 Added support of Row Security Policies. Fixes #5516 2020-06-15 15:44:59 +05:30
Dave Page bfa0b87791 Make sure we have the wheel package in the venv as it may be needed to build other dependencies. 2020-06-12 11:42:42 +01:00
Aditya Toshniwal 8c20f0c0d2 Some clumsy coding related fixes reported by SonarQube. 2020-06-12 15:24:17 +05:30
Satish V ee1ea47e88 Fixed issue 'expects 4 arguments, but 5 were provided' reported by SonarQube. 2020-06-12 15:15:07 +05:30
Satish V 82c4a4a03e Improve code coverage and API test cases for Collations. Fixes #5325 2020-06-11 11:12:41 +05:30
Dave Page 21efe6f902 Remove blank line at EOF. 2020-06-10 17:03:08 +01:00
Dave Page 5c60dcd501 Remove blank line at EOF. 2020-06-10 17:02:39 +01:00
Dave Page 85e89c869a Cleanup some code smells identified by SonarQube. 2020-06-10 16:42:59 +01:00
Dave Page 1485ff338f Don't use the venv to create the venv on Windows as it doesn't allow python.exe to be relocated on Windows. Use the tried and tested virtualenv instead. Fixes #5595 2020-06-09 16:28:36 +01:00
Akshay Joshi ac4b5ab7fa 1) Correct the typo 'pythonw.exe' should be 'python.exe' for Windows if 'pythonw.exe' not found.
2) Added logging to identify the interpreter command for Windows.
2020-06-09 19:05:20 +05:30
Aditya Toshniwal eb971a0320 Update Codemirror version to the latest which allows us to set screen reader labels on Codemirror editor.
refs #5197
2020-06-08 12:26:12 +05:30
Yogesh Mahajan 92d9c41da7 Fixed connection and version number detection issue when the database server is upgraded. Fixes #5507 2020-06-04 18:18:11 +05:30
Dave Page ba91e3fc1f Fix a couple of typos. 2020-06-04 10:43:05 +01:00
Satish V 726ecd79e6 Fixed import statements.
refs #3669
2020-06-03 12:49:05 +05:30
Satish V d22e276586 Ensure that proper error should be displayed for the deleted node. Fixes #3669 2020-06-03 11:26:26 +05:30
Dave Page 3d0319dba7 Include the libpq5 deb in the Debian/Ubuntu repos. 2020-06-02 13:23:12 +01:00
Dave Page 4a0efc0e86 Fix message. 2020-06-02 13:19:46 +01:00
Dave Page 445abf1e31 Quieten pushd/popd 2020-06-02 13:14:02 +01:00
Dave Page 7f58552f60 Include the PostgreSQL repo so we get the latest libpq 2020-06-02 12:33:57 +01:00
Dave Page 2549085872 We need yum-utils. Fix the rpmmacros message whilst passing. 2020-06-02 11:54:36 +01:00
Dave Page 9e67a0b0e7 Include postgresql-libs in our Yum repos. 2020-06-02 11:30:07 +01:00
Akshay Joshi a1a232a1f1 The 'pwd' module is not available on Windows, so replacing it with the 'getpass' module.
refs #5576
2020-06-02 14:09:44 +05:30
Nagesh Dhope c932213abd Disabled the Stop process button after clicking it and added a message 'Terminating the process...' to notify the user. Fixes #3787 2020-06-02 11:23:52 +05:30
Dave Page a0c19252df Improve error messaging if the storage and log directories cannot be created. Fixes #5576 2020-06-02 11:11:53 +05:30
Dave Page 67c978b7a4 Don't use virtualenv to create the venv on Windows. 2020-06-01 10:32:41 +01:00
Dave Page f4750f0096 Ignore venv directories in the tree. 2020-06-01 10:31:34 +01:00
Dave Page 676fec8694 Cleanup Windows build scripts and ensure Windows x64 builds will work. Fixes #5574 2020-06-01 09:52:24 +01:00
Dave Page 60a0b66414 Conflict with postgresql-libs 9.2 and below as there won't be a suitable libpq.
Per discussion with Devrim.
2020-06-01 09:42:18 +01:00
Aditya Toshniwal 1050c9857a Fixed an issue when dumping servers from a desktop pgAdmin app by providing an option '--sqlite-path'. Fixes #5521 2020-06-01 11:22:38 +05:30
Dave Page b21b03495d Tell Yum where the GPG public key is, and fix the arch and version variables, per Devrim. 2020-05-29 14:04:51 +01:00
Yogesh Mahajan 4632a7faba Fixed an issue where pgadmin detects the wrong browser version of the Microsoft Edge. Fixes #5465 2020-05-29 13:07:02 +05:30
Dave Page ccb39bea1a Require postgresql >= 9.5, and don't bother with Recommends. Per discussion with Devrim. 2020-05-28 16:26:44 +01:00
Dave Page bda62cb1f1 Don't try to import the signing key. YUM/RPM will do that for us, per Devrim. 2020-05-28 16:04:14 +01:00
Yogesh Mahajan 09b76b306c Fixed typo in exception keyword. Fixes #5539 2020-05-28 18:11:41 +05:30
Yogesh Mahajan e10f1274dc Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button. Fixes #5416 2020-05-28 16:39:26 +05:30
Dave Page 9468c16233 Update hint test to use a modern Python version. 2020-05-27 11:36:03 +01:00
Dave Page 65fb0f901c Message clarification and improvement. 2020-05-26 15:02:59 +01:00
Akshay Joshi 1347c89d61 Update version for release. 2020-05-25 17:11:12 +05:30
Akshay Joshi b1cbcc7ef6 Fixed data truncation issue when updating the data of type character with length. Fixes #5481 2020-05-25 17:05:47 +05:30
Domenico Sgarbossa 22c3a2649b Update Italian translation. 2020-05-25 11:24:37 +05:30
Identifier Anonymous 2bb0b25688 Update Japanese translation. 2020-05-25 11:13:37 +05:30
Libor M 2aefc6361e Update Czech translation. 2020-05-25 11:09:52 +05:30
Dave Page 83cb01b8cd Update dependencies in the Docker container and remove PG 9.4 utilities from the Docker container as it's now out of support.
Fixes #5552.
Fixes #5553.
2020-05-22 17:02:12 +01:00
Akshay Joshi d42b712ee4 Update message catalogs 2020-05-22 19:13:13 +05:30
Dave Page fec458dd6a Add repo build information to the Debian README. 2020-05-22 11:58:24 +01:00
Akshay Joshi 9b8902dfb8 Fixed the SQL help issue for EDB Postgres Advanced Server. Fixes #4099 2020-05-22 14:11:58 +05:30
Dave Page 4a8037fc6a Test commit 2020-05-22 09:12:54 +01:00
Yogesh Mahajan d927a517aa Fixed feature test failures on the selenium grid for concurrent execution. 2020-05-21 19:44:28 +05:30
Dave Page 96939ba985 Add information to the Redhat README about signing RPMs, creating a repository and creating repo RPMs. 2020-05-21 12:47:41 +01:00
Dave Page 414b074bad Tidy up the web setup script output. 2020-05-19 14:27:23 +01:00
Yogesh Jain 7b1cac6914 Fixed an issue where clicking on Select All button, not selecting all the options in pgAgent job scheduler. Fixes #5496 2020-05-19 13:54:21 +05:30
Dave Page 4aaacfd5b0 Add the public key for our packages for the RPM build. 2020-05-18 15:43:17 +01:00
Dave Page 52187306ce Create the dist/ directory if needed. 2020-05-18 15:37:18 +01:00
Dave Page 0e799b16b0 Only try to run make clean if there is a Makefile present. 2020-05-18 11:18:03 +01:00
Dave Page 569d05df4e Remove obsolete file. 2020-05-18 11:17:07 +01:00
Dave Page eac5fe5157 Cleanup and refactor the macOS build scripts. Fixes #5525 2020-05-18 10:22:59 +01:00
Dave Page 5337514c63 Allow the base directory for the repo to be overridden from the environment. 2020-05-18 10:22:28 +01:00
Khushboo Vashi d1bdb178e2 Fixed an issue where if LDAP_SEARCH_BASE_DN is not set then, the value for LDAP_BASE_DN will be considered. Fixes #5487 2020-05-18 12:35:34 +05:30
Yogesh Mahajan 9f445dc052 Improve code coverage and API test cases for Indexes. Fixes #5333 2020-05-18 12:29:33 +05:30
Aditya Toshniwal d58c33dec0 Search object UI improvements. Fixes #5493 2020-05-18 11:29:12 +05:30
Khushboo Vashi 0f56c25893 Changed the user identity from email to username in the log file.
refs #5452
2020-05-18 11:01:20 +05:30
Dave Page 762784d2b5 Add a script for generating a repo RPM. 2020-05-15 11:22:28 +01:00
Pradip Parkale 6d6cd19b37 Improve code coverage and API test cases for Triggers and Compound Triggers. Fixes #5335 2020-05-15 12:50:50 +05:30
Akshay Joshi c0451cd454 Added connected pgAdmin user and connection name in the log file. Fixes #5452
Patch By: Nico T
2020-05-13 17:43:21 +05:30
Akshay Joshi 0620fafb6c Fixed PEP8 issues discovered after pycodestyle gets upgraded. 2020-05-13 17:14:32 +05:30
Khushboo Vashi a9a1a975a6 Added compatibility for Flask-Security-Too version 3.2 2020-05-13 16:02:38 +05:30
Akshay Joshi 8a06a836f4 Ensure that pgAdmin4 should be compiled with older OSX SDK's. 2020-05-12 17:22:22 +05:30
Yogesh Jain dba5761ad0 Fixed an issue where clicking on the cross button of the alert box on the login page is not working. Fixes #4033 2020-05-12 17:22:22 +05:30
Yogesh Mahajan 8ec1d4c9eb Fixed feature tests failure on chrome caused due to selenium grid implementation changes. 2020-05-12 17:22:22 +05:30
Akshay Joshi 46e9924ebb Fixed Unicode decode error 'utf-8' codec can't decode byte. Fixes #5510
It's a regression of commit id: 04d6d4e2ccc129baa698471ce0680ccabe2282be
2020-05-12 17:22:22 +05:30
Dave Page 12a7ce54d9 Ubuntu 20.04 needs python3-wheel to be explicitly installed. 2020-05-11 15:08:40 +01:00
Akshay Joshi 9d08776824 Ensure that maintenance job should be worked properly for indexes under a materialized view. Fixes #4223. 2020-05-11 16:47:36 +05:30
Akshay Joshi 073d90c4a6 Fixed internal server error when clicking on Triggers -> 'Enable All' for partitions. Fixes #5052 2020-05-11 15:18:39 +05:30
Dave Page 7d4ddc3910 Clarify and correct the docs on enabling the pl/debugger plugin on the server per Jakob Egger. Fixes #5503 2020-05-11 09:05:15 +01:00
Yogesh Mahajan 1294c089a8 Implement Selenium Grid to run multiple tests across different browsers, operating systems, and machines in parallel. Fixes #5255 2020-05-11 12:11:31 +05:30
Aditya Toshniwal b64896f558 Fixed generated SQL issue for auto vacuum options. Fixes #5398
Fixed some more issues:

 1) pgAdmin allows only true or false values for autovacuum_enabled,
    and there is no way to reset it individually without disabling a custom auto vacuum.
    To fix this, the control is changed from the switch to three state buttons.
 2) Setting any vacuum options to zero made the option disappear from the SQL.
 3) Right-click on a table with vacuum options set and create a new table.
 4) The parameters tab will have the options prefilled.
 5) Changed the UI a bit to remove unnecessary space around. Added "Autovacuum" before enabled.
    The SQL generated was appending a ".0" to decimal vacuum options. Changed to remove the leading ".0".
2020-05-08 14:30:30 +05:30
Ashesh Vashi e73e2d2502 Fixed the errors, and warnings reported by pylama.
TODO::
- Don't use unicode in Python 3 for removing the support of Python 2 (
  psycopg2 driver - __init__.py, server_manager.py).
- Merge the lastest pgcli (version: 3.0.0) for SQL autocompletion.
2020-05-08 14:13:38 +05:30
Satish V 9338bdcb3a Fixed an issue where the newly added table is not alphabetically added to the tree. Fixes #5434
Fixed an issue when renaming the column not added in the proper order. Fixes #5450
2020-05-08 12:52:03 +05:30
Khushboo Vashi d68e6bd892 Remove Python2 modules.
refs #5443
2020-05-08 12:28:21 +05:30
Pradip Parkale 057a2b2312 Improve code coverage and API test cases for the Rules module. Fixes #5334 2020-05-07 16:27:58 +05:30
Dave Page 46d186a49f Show the startup log as well as the server log in the runtime's log viewer. Fixes #5489 2020-05-07 11:01:02 +01:00
Dave Page 7164c677de UI layout tweaks. 2020-05-07 10:39:28 +01:00
Akshay Joshi 6ad46e1860 Fixed invalid literal issue when removing the connection limit for the existing role. Fixes #5001 2020-05-07 13:14:45 +05:30
Akshay Joshi a662d866af Ensure that 'With OID' option should be disabled while taking backup of database server version 12 and above. Fixes #4840 2020-05-07 11:56:43 +05:30
Akshay Joshi a0940fd145 Typecast the object to 'text' before using it in length() function, so that correct length function gets called. 2020-05-06 17:34:18 +05:30
Nagesh Dhope f61448eea2 Fixed an issue where the background job creation fails if there is only a version-specific python binary available in PATH. Fixes #5480 2020-05-06 12:38:06 +05:30
Akshay Joshi 943495de31 Fixed list sorting issue in the schema diff tool. Fixes #5440
Fixed an issue while comparing the two identical schemas using the schema diff tool. Fixes #5449
2020-05-06 11:25:43 +05:30
Aditya Toshniwal 059f1e38cc Refactor pgAdmin4.py so it can be imported and is a lot more readable. Fixes #5455 2020-05-04 15:28:44 +01:00
Aditya Toshniwal 370094274c Fixed post-login redirect location when running in server mode under a non-default root. Fixes #5473 2020-05-04 15:00:45 +01:00
Dave Page 04d6d4e2cc Remove support for Python 2. Fixes #5443 2020-05-04 14:58:49 +01:00
Dave Page cf31d0187b Remove support for building the macOS appbundle with Python 2.7. Refs #5443 2020-05-04 14:56:28 +01:00
Akshay Joshi f1963401d6 Raise an exception under Python < 3.4 for WSGI mode.
refs #5443
2020-05-04 15:06:45 +05:30
Dave Page 94bd1f1680 Cleanup Python detection in the runtime project file. Fixes #5444 2020-05-04 10:20:51 +01:00
Dave Page 908e156113 Correct ipv4 "all interfaces" address in the container docs, per Frank Limpert. Fixes #5466 2020-05-04 09:25:05 +01:00
Ganesh Jaybhay 5fe7813f9f Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog. Fixes #5469 2020-05-04 13:19:13 +05:30
Satish V d61b8eb1b3 Gracefully informed the user that the database is already connected when they click on 'Connect Database...'. Fixes #3694 2020-05-04 13:08:56 +05:30
Murtuza Zabuawala 0fc2afb829 Add Reverse Engineered and Modified SQL tests for Column and Type. 2020-05-04 12:48:24 +05:30
Yogesh Jain cc2e3ece7a Ensure that file browse home button should point to /Users/akshayjoshi rather than /. Fixes #4279 2020-05-04 12:40:19 +05:30
Khushboo Vashi 5656f756e6 Ensure that the dependencies tab shows correct information for Synonyms. Fixes #5422 2020-05-04 12:23:18 +05:30
Dave Page 9bdf900b25 Rename README 2020-05-01 15:18:29 +01:00
Dave Page 0ec60a6f85 Minor cleanup and modernisation. 2020-05-01 15:14:46 +01:00
Dave Page 70e24ba059 Rename the README and fix it up to match modern reality. 2020-05-01 15:14:04 +01:00
Akshay Joshi ad80217593 Remove Python2 references from the source code.
refs #5443

Initial patch: Neel Patel
2020-04-30 17:22:48 +05:30
Dave Page 7dd00a1494 Raise an exception under Python < 3.4.
It also cleans up the README to remove references to Python 2
and removes Python 2-isms from the main config.

refs #5443
2020-04-30 14:17:00 +05:30
Dave Page 109051e1d5 Remove Python 2 support from the desktop runtime
refs #5443
2020-04-30 13:04:09 +05:30
Dave Page 86afec860f Remove Python 2 support from the Python tests.
refs #5443
2020-04-30 12:56:45 +05:30
Dave Page 393741fd9d Remove Python 2.7 support from the wheel package.
refs #5443
2020-04-30 12:51:58 +05:30
Dave Page e8a4b46ba1 Another attempt at fixing the 'do we need the --embed flag for Python' problem.
This change looks at the output from python-config --help (which may go
to stderr or stdout), and if it includes --embed, adds it to the later
call to get the libs string.
2020-04-29 16:19:54 +01:00
Dave Page 97be3d8179 Don't rely on python-config sending the help message to stderr, as older versions seem to use stdout. 2020-04-29 15:49:16 +01:00
Dave Page 505956d1fa OK, another attempt at this as it fails on non-Linux non-Python 3.8. 2020-04-29 14:29:47 +01:00
Dave Page f7ef86dced Sigh. Remove extraneous closing bracket. It's always a bracket. 2020-04-29 14:04:32 +01:00
Dave Page 3138f36e05 Fix the runtime build with Python 3.8 on Linux 2020-04-29 13:55:53 +01:00
Libor M fe264aafa7 Update Czech translation. 2020-04-28 11:04:43 +05:30
Khushboo Vashi 88aebb64f9 Fixed failed to fetch utility error when click on refresh(any option) materialized view. Fixes #5447
It's a regression of #5213
2020-04-28 11:00:23 +05:30
Akshay Joshi 6d1f67f3be Reverting patch to remove Python 2.7 support from wheel package to avoid any issue before 4.21 release. 2020-04-27 21:43:35 +05:30
Akshay Joshi 50a423b142 Update version for release. 2020-04-27 21:23:51 +05:30
Dave Page b716800474 Remove Python 2.7 support from the wheel package. 2020-04-27 21:20:43 +05:30
Aditya Toshniwal b695329d2d Fixed API test cases for backup, restore and maintenance. 2020-04-27 21:17:34 +05:30
Abhilasha Narendra fbee63085c Documentation of LDAP authentication support. Fixes #5348 2020-04-27 20:28:39 +05:30
Aditya Toshniwal 99d1068f70 Fixed an issue where the search object not able to locate pg_toast_* tables in the pg_toast schema. Fixes #5441 2020-04-27 19:51:56 +05:30
Pradip Parkale 18748846ef Fixed the regression where initial changes make the Save button enabled when the table dialog is opened. Fixes #4504 2020-04-27 18:48:44 +05:30
Satish V b80784f5a1 Fixed an issue where the user should not be able to add columns in the creation order after 50 columns.
Regression of the initial patch.

Fixes #5043
2020-04-27 18:01:09 +05:30
Murtuza Zabuawala 76eb3e9b67 Fixed an issue when the user performs refresh on a large size materialized view. Fixes #5213 2020-04-27 17:30:23 +05:30
Khushboo Vashi 0f6abcc7fa Fixed an issue where the user is not able to create a server if login with an LDAP account. Fixes #5439
Improved LDAP error messages.
2020-04-27 15:33:19 +05:30
Fred Escallier ed106e3577 Update French translation. 2020-04-27 13:52:13 +05:30
Domenico Sgarbossa 3c9aed4d6f Update Italian translation. 2020-04-27 13:50:31 +05:30
Yogesh Jain 9daa7c7a7c Added title to the login page. Fixes #5430 2020-04-27 12:38:11 +05:30
Dave Page b7dad25d3e We support Python 3.8 2020-04-24 16:20:25 +01:00
Dave Page 64a26b560b Cleanup build log output by removing unnecessary files in a nicer way. 2020-04-24 15:07:50 +01:00
Dave Page d5bfc726c0 Ignore the pre-compiled resources. 2020-04-24 14:56:46 +01:00
Akshay Joshi 0dcb448f2e Update library inventory. 2020-04-24 18:28:29 +05:30
Akshay Joshi ccafde604e Update message catalogs. 2020-04-24 18:24:00 +05:30
Pradip Parkale ef58d277ca Fixed an issue where like options should be disabled if the relation is not selected while creating a table. Fixes #4504 2020-04-24 18:22:11 +05:30
Akshay Joshi 6642860d51 Remove the 'Beta' word from the Dark Theme. 2020-04-24 16:52:39 +05:30
Aditya Toshniwal aec64aa582 Fixed following issues for 1257:
1. For synonyms, the property is shown as "Public Synonym".
 2. For system procedure, the flag should be True but it is displaying as False.
 3. For both views and materialized views, the property is "System View".
 4. For FTS templates, the property is showing as "System FTS Parser".

Fixes #1257
2020-04-24 16:35:59 +05:30
Akshay Joshi 6de1d3f7de Fixed feature test.
Pass the row height to the function instead of making the
decision onthe basis of whether it is a new row or not.
2020-04-24 13:16:18 +05:30
Aditya Toshniwal 90849fe29b Fixed mouse click issue where it does not select an object in Browser unless the pointer is over the object. Fixes #4180 2020-04-24 11:32:11 +05:30
Nagesh Dhope 17129b259b Reverting patch for RM #3269.
We observed that sometimes the browser is getting hanged and sometimes
the ViewData grid is getting disappear. We suspect its due to the number
of rows to update on the slick grid after fetching next of rows.
2020-04-24 11:13:13 +05:30
Aditya Toshniwal dfb74904ed Ensure all object types have a System XXX? property. Fixes #1257 2020-04-23 17:31:40 +05:30
Akshay Joshi 2b5c90e379 A warning message will be displayed only when the package header is changed for EPAS packages. Fixes #5410 2020-04-23 17:14:01 +05:30
Satish V 2e29f3fd6d Fixed an issue where columns names should be visible in the order of their creation in the browser tree. Fixes #5043 2020-04-23 16:42:42 +05:30
Ashesh Vashi 637c80c38b Recreate the node item in the tree, when 'id' has been changed of the node.
Fixes #5053
2020-04-23 11:11:15 +05:30
navnath gadakh c76732e3e7 Ensure that default sort order should be using the primary key in View/Edit data. Fixes #5157 2020-04-22 18:47:13 +05:30
Neel Patel 870bcbd932 SVG image format plugin is added to render the image file from stylesheet. And also removed the theme components staging files used during windows and Mac bundling. 2020-04-22 18:47:13 +05:30
Khushboo Vashi b0464500ca Ensure that the user should not be able to change the authentication source. Fixes #5419
Ensure error should be handled properly when LDAP user is created with the same name. Fixes #5420
Fixed an issue where an internal user is not created if the authentication source is set to internal and ldap. Fixes #5432
2020-04-22 18:47:13 +05:30
Nagesh Dhope 5e91ed2bb1 Fixed slider jump issue by making an API call to fetch the next batch of rows only after a user stops scrolling down. Fixes #3269 2020-04-22 18:47:13 +05:30
Khushboo Vashi 6e5dbf7beb Added multiple drop/delete functionality for the table constraints. Fixes #3900 2020-04-22 18:47:13 +05:30
Yogesh Jain 553eeb034d Fixed tooltip crop issue for the large complex query with zoom factor. Fixes #5352 2020-04-22 18:47:13 +05:30
Ashesh Vashi 858294f36e Fixed validation errors in view/materialized view javascript to
determine the number columns chagned. It was trying to execute
'replace' and 'includes' function on undefined values instead of
string value.

Also - changed the warning message, and separated the 'Do you want to
continue?' syntax in separate line for better user experience.

Fixes #5053
2020-04-22 17:19:18 +05:30
Akshay Joshi 4c616f32eb 1) Fixed feature test and API test cases.
2) Added logic to exclude RESQL test cases.
2020-04-22 13:57:32 +05:30
Nagesh Dhope b29bc6868c Fixed an issue where [null] and [default] values are not get copied. Part of #3947 2020-04-22 12:08:52 +05:30
Neel Patel 07f72252d7 Added job step and job schedule disable icons to identify it quickly within the browser tree. Fixes #4636
Add Reverse Engineered and Modified SQL tests for pgAgent jobs. Fixes #4623
Fixed modified SQL issue while adding an exception in pgAgent job schedule. Fixes #5356
2020-04-21 17:00:21 +05:30
Akshay Joshi f289dfb762 Fixed following issues for packages:
1) Removing the package header removes the body as well.
  2) Schema is not visible on the properties dialog.
  3) Reverse engineering SQL and Create script not showing schema-qualified packages.

Fixes #5410
2020-04-21 16:49:23 +05:30
Nagesh Dhope 8d4f3c07c7 Fixed an issue where slider jumps up when new rows get loaded while scrolling down in the DataView panel in the query tool. Fixes #3269 2020-04-21 13:29:49 +05:30
Yogesh Jain 7e30a99937 Fixed the rightmost and bottom tooltip crop issues in the explain query plan. Fixes #5352 2020-04-21 13:14:26 +05:30
Pradip Parkale 3d516101a4 Fixed an issue wherein grant wizard the last object is not selectable. Fixes #4545 2020-04-21 13:09:15 +05:30
Neel Patel b0b60da84a Fixed an issue where the checkbox is not visible on Configuration dialog in runtime for the dark theme. Fixes #5402 2020-04-20 19:16:32 +05:30
Aditya Toshniwal 05abb9e430 Ensure that the query tool context menu should work on the collection nodes. Fixes #5415 2020-04-20 18:50:20 +05:30
Aditya Toshniwal dc4571a3c8 Fixed search object issue when the object name contains special characters. Fixes #5401 2020-04-20 18:40:40 +05:30
Aditya Toshniwal 7361470b64 Fixed an issue where the search object module unable to locate the object in the browser tree. Fixes #5396 2020-04-20 18:27:36 +05:30
Amol Vyavahare f282b26883 Fixed an issue when the user creates a temporary table with 'on commit drop as' clause. Fixes #4946 2020-04-20 18:22:34 +05:30
Akshay Joshi 4692b21bcf Fixed an issue where schema diff marks an identical table as different. Fixes #5350
Fixed an issue where schema diff showing changes in the identical domain constraints. Fixes #5315

Ignore the keys from the source and target list and also sort both the lists.
2020-04-20 18:04:16 +05:30
Libor M 36a3d4e53b Some more gettext() usage fixes:
- fixed `%` vs. `.format()`
  - unified texts and usage `%s` vs. `{}`/`{0}`
  - improved text sentences for translate
  - added gettext for next texts
2020-04-20 11:19:09 +05:30
Nagesh Dhope 8bdfa18efb Ensure that if the delimiter is set other than comma then download the file as '.txt' file. Fixes #4573 2020-04-17 17:37:02 +05:30
Yogesh Jain 52d031f2d0 Fixed encoding issue while saving data in encoded charset other than 'utf-8'. Fixes #4684 2020-04-17 16:30:22 +05:30
Akshay Joshi d8ad0b8faf Fixed validation issue in Synonyms node. Fixes #5409 2020-04-17 14:50:38 +05:30
Akshay Joshi c6deb9393c Fixed an issue while removing the package body showing wrong modified SQL. Fixes #5410 2020-04-17 13:06:07 +05:30
Murtuza Zabuawala d35433d0b8 Fixed an issue where the query tool unable to load the file which contains the BOM marker. Fixes #3495 2020-04-17 12:40:09 +05:30
Nagesh Dhope 0ce4f49e08 Fixed copy-paste row issues in View/Edit Data. Fixes #3947
1) Copy table rows across two or more active query tool sessions.
  2) Copied rows can be pasted multiple times without selecting a row in the query tool grid.
  3) Adds an empty row at the end in the query tool grid after pasting rows.
2020-04-16 15:25:39 +05:30
Aditya Toshniwal dc1e32a632 Fixed internal server error when the database server is logged in with non-super user. Fixes #5400 2020-04-16 15:05:17 +05:30
navnath gadakh c0a2f1f24d Ensure that text larger than underlying field size should not be truncated automatically. Fixes #5210 2020-04-16 14:39:31 +05:30
Akshay Joshi 0dd1cb3fc1 Fixed documentation error. 2020-04-16 13:48:26 +05:30
Murtuza Zabuawala eec2cfd5dd Fixed an issue where the Mode cell of argument grid does not appear completely in the Functions dialog. Fixes #5375 2020-04-16 13:16:07 +05:30
Shubham Agarwal d6cab7b421 Ensure the DROP statements in reverse engineered SQL are properly quoted for all objects. Fixes #4440 2020-04-16 13:06:50 +05:30
Libor M 8254e9f030 Some minor gettext and format fixes. 2020-04-16 12:55:19 +05:30
Ganesh Jaybhay 7493649893 Added schema-qualified dictionary names in FTS configuration to avoid confusion of duplicate names. Fixes #4709 2020-04-16 12:47:00 +05:30
Khushboo Vashi 738c421edf Ensure that Constraint Trigger, Deferrable, Deferred option should be disabled when the user selects EDB-SPL function for the trigger. Fixes #4957 2020-04-16 12:38:20 +05:30
Murtuza Zabuawala c41da41efe Fixed python exception error when user tries to download the CSV and there is a connection issue. Fixes #4858 2020-04-15 16:46:03 +05:30
Khushboo Vashi ed0a596286 Added alert message to Reset Layout if any of the panels from Query Tool failed to load. Fixes #5366 2020-04-15 16:23:54 +05:30
Aditya Toshniwal 31a929388b Make changes to use gettext() function correctly. 2020-04-15 16:23:17 +05:30
Aditya Toshniwal 0424f7d962 Fixed following issues for Procedures:
1) Change comments on the procedure with arguments as a procedure can be overloaded.
     Note that on EPAS servers, procedure overloading works only for v11+.
  2) The save button of a procedure dialog is enabled without any change.
  3) Fixed formatting of the reverse-engineered SQL.
  4) On EPAS servers, the parameters set were not displayed in the SQL generated.
     They are visible only if set to edbsql.
  5) Changing the volatility option of any existing procedure was not working.
  6) Changing the parallel option (EPAS v9.6+) was not working.
  7) Added RE-SQL test cases for procedures.

Fixes #4620, Fixes #4873
2020-04-15 13:54:17 +05:30
Shubham Agarwal 8654d6cf43 Fixed an issue where the mode is not shown in the properties dialog of functions/procedures if all the arguments are IN arguments. Fixes #5387 2020-04-15 12:33:54 +05:30
Neel Patel 25553b11ed Correct the build script whereby mistake we have removed the theme components from the source tree while building. 2020-04-15 11:28:18 +05:30
Dave Page 74b3495542 Warn the user if an unsupported, deprecated or unknown browser is detected. Fixes #5399 2020-04-14 21:15:02 +05:30
Neel Patel ee29e64039 Fixed Mac OSX build by adding the prefix in qrc file. 2020-04-14 20:23:32 +05:30
Ashesh Vashi 3a4641889c Using 'is_valid_ipaddress' utility function everywhere 2020-04-14 18:51:48 +05:30
Ashesh Vashi d9c84edf9a A valid ip address can be IPv4/IPv6 2020-04-14 18:45:45 +05:30
Ashesh Vashi a930c6617b Merged adjustanct 'if' statements when allowed.
Also - removed the unused variables.
2020-04-14 18:43:04 +05:30
Ashesh Vashi 6c5883bce0 We don't need to pass gettext for inline CSS transforation 2020-04-14 18:43:04 +05:30
Ashesh Vashi 414e336852 [Authentication] Some of the base class functions are not static
function, but - methods. Hence - 'self' should be used, and not 'cls'.

Also - use a constant for duplicate string literal in LDAP
authentication implementation.
2020-04-14 18:43:04 +05:30
Ashesh Vashi d226ffbd1f [Foreign Key] Removed 1 unexpected arguments; 'get_node_list' expects
5 positional arguments.

Also,
- Using 'gettext' instead of '_'.
- Using constant string for 'foreign_key not found' error message.
2020-04-14 18:40:15 +05:30
Neel Patel 65bc196eba Fix the bundling issue of dark mode runtime support for Windows and Mac. 2020-04-14 15:19:39 +05:30
Ganesh Jaybhay 12530cd973 Ensure index dropdown should have existing indexes while creating unique constraints. Fixes #5007 2020-04-14 14:02:33 +05:30
Khushboo Vashi a0fcb38e68 Fixed syntax error while refreshing the existing synonyms. Fixes #5383 2020-04-14 13:43:56 +05:30
Pradip Parkale a05acb4f99 Fixed tab key navigation for some dialogs. Fixes #5371 2020-04-14 13:32:03 +05:30
Neel Patel 21cb1a0166 Fix the typo in the test configuration json file. 2020-04-14 13:07:27 +05:30
Shubham Agarwal 41521a9b98 Ensure all object names in the title line of the reverse-engineered SQL are not quoted. Fixes #4445 2020-04-14 13:02:58 +05:30
Akshay Joshi 781b766ac4 Fixed an issue where difference SQL is not seen in the schema diff tool for Types. Fixes #5302 2020-04-13 20:24:12 +05:30
Akshay Joshi df11f28593 Fixed an issue where the identical packages and sequences visible as different in the schema diff tool. Fixes #5362 2020-04-13 18:06:20 +05:30
Khushboo Vashi 030741bba5 Modified some logic for the EPAS server as the user can change the view definition without dropping it. Fixes #5053 2020-04-13 16:00:01 +05:30
Dave Page 41be5479af Added dark mode support for the configuration dialog on Windows/macOS runtime. Fixes #4292
Detects dark mode at server start and styles the runtime accordingly.

Patch modified by: Neel Patel
2020-04-13 13:22:00 +05:30
Neel Patel 9c93e93cb4 Make the configuration window in runtime to auto-resize. Fixes #4864 2020-04-13 13:09:26 +05:30
Aditya Toshniwal b427a87724 Fixed an issue where changing the values of columns with JSONB or JSON types to NULL. Fixes #4969 2020-04-13 12:34:32 +05:30
Aditya Toshniwal 077589e08b Fixed an issue where right-clicking a browser object does not apply to the object on which right-click was fired. Fixes #3523
Fixes keyboard navigation on the context menu applied to browser tree.
2020-04-10 17:34:57 +05:30
Murtuza Zabuawala 4de6b93ba8 Ensure that the password prompt should not be visible if the database server is in trust authentication mode. Fixes #2813 2020-04-10 17:03:04 +05:30
Aditya Toshniwal 014ce31589 Fixed user management related issues:
1) Unable to add a user when there are many users. The dialog went blank. Fixed.
 2) The error message did not have a close button. Fixed.
 3) When clicked on the add button, then the cursor will focus on the email box of
    the new row for convenience.
 4) When the dialog opens, the cursor will focus on the search text box.
 5) By default, the "User" role will be selected when adding a new user.
    Also removed an empty option in the roles dropdown.
 6) When the search filter is applied and we try to add an already existing user, the
    validation is done only on the filtered data and not on all the users' data. 

Fixes #5227
2020-04-10 16:49:33 +05:30
Nagesh Dhope d9574f3caa Fixes following OSX native keyboard shortcuts in Query Tool:
1) option+arrow (L/R) should skip by "word"
  2) option+arrow (up/down) should go up/down one line
  3) shift+option+arrow (L/R) should select/highlight by "word"
2020-04-10 15:21:56 +05:30
Libor M 6a9af07f7a Fixed gettext usage:
- fixed gettext usage with .format() only for original text with %s
  - fixed typos
  - fixed translation yes/no buttons in the dialog.
  - improved translating sentences without "connecting" words (eg. see web/pgadmin/dashboard/static/js/dashboard.js,
     word 'cancel' needs to be translated in the Czech language as 'zrušit' but in another sentence as 'zrušení')
  - added gettext for text translations.
2020-04-10 14:52:41 +05:30
Khushboo Vashi e238ecf182 Ensure that OID should be shown in properties for Synonyms. Fixes #5270 2020-04-10 13:19:52 +05:30
Akshay Joshi c8646f99c0 Fixed typo 2020-04-09 21:46:47 +05:30
Akshay Joshi 31f255b541 Added support of Foreign Tables to the Schema Diff. Fixes #5263 2020-04-09 21:03:28 +05:30
Akshay Joshi fecf3915c5 Fixed API/RESQL test cases for View/MView failed due to #5053 commit. 2020-04-09 21:03:28 +05:30
Ashesh Vashi 8a550b569f Fixed expected output status code, as 410 should be the status code
for the object (CAST) not exists in the database server.
2020-04-08 16:51:53 +05:30
Ashesh Vashi 1a34f61b24 Moved the ip-address check functionality to a separate file to improve
the maintainability of the code.
2020-04-08 16:50:14 +05:30
Ashesh Vashi 775e61c248 Fixed pep8 issue 2020-04-08 14:34:34 +05:30
Ashesh Vashi aa7ced4ef1 Fixed a typo in previous commit 2020-04-08 14:30:29 +05:30
Ashesh Vashi d9f6baac72 Various misc fixes:
- Using the 'gettext' as oppose to '_', which is not defined
- Define missing variables
- Fixed escape character in string with double quote
- Removed some dead code in a test case
- Removed unnecessary self assignment

Includes some fixes for Accessibility improvements
- Use semantic markup to mark emphasized or special text
- Added hidden legend in <fieldset> for better screen reader support
2020-04-08 14:14:25 +05:30
Ashesh Vashi 8fe687eb55 [Rules] Removing unnecessary 'if' condition 2020-04-08 13:14:14 +05:30
Ashesh Vashi 6c693d158e [Exclusion Constraint] Fixed an typo - it should have been assignment 2020-04-08 13:05:28 +05:30
Ashesh Vashi 6b3e1f1e65 [TABLES] Do not assign the paramter values, use separate variable for new value 2020-04-08 13:04:24 +05:30
Ashesh Vashi 8fe344c268 [EDB Package Functions] [Functions] Fixed typos:
- 'gettext' should be used as '_' is not defined
    - Identical expressions should not be used on both sides of a binary operator.
2020-04-08 13:02:37 +05:30
Ashesh Vashi c7afa30d0c [Packages] Fixed a typo 2020-04-08 13:00:49 +05:30
Ashesh Vashi 14f21921bb [Functions] Fixed typos:
- 'gettext' should be used as '_' is not defined
- Identical expressions should not be used on both sides of a binary operator.
2020-04-08 13:00:01 +05:30
Ashesh Vashi 29ae6dfbf6 [FTS Configuration] Fixed an typo - it should have been assignment 2020-04-08 12:56:51 +05:30
Ashesh Vashi a6c03a6b75 [Domain] Existing expression will expression will always result into false 2020-04-08 12:54:37 +05:30
Ashesh Vashi 068b812245 [COLLATIONS] Do not assign the paramter values, use separate variable for new value 2020-04-08 12:53:48 +05:30
Ashesh Vashi a84a62def8 Using the 'gettext' as oppose to '_', which is not defined in these
files.
2020-04-08 12:34:57 +05:30
Ashesh Vashi 7f0847b95d Using the 'gettext' as oppose to '_', which is not defined in the file 2020-04-08 12:29:11 +05:30
Ashesh Vashi 073e310a5a [Accessibility] Use semantic markup to mark emphasized or special text.
Reference: https://www.w3.org/TR/WCAG20-TECHS/H49.html
2020-04-08 12:27:18 +05:30
Ashesh Vashi d9e95d13e6 [LDAP Authentication] Use more secure protocol TSL v1.2 for security reason 2020-04-08 11:57:01 +05:30
Khushboo Vashi f4607885e1 Fixed an issue where changing the columns in the existing view throws an error. Fixes #5053
PostgreSQL doesn't allow to change the view columns. So the view should be dropped first
and then recreate it and also the user will get a warning first.
2020-04-08 11:29:03 +05:30
Aditya Toshniwal 03f4109ac4 Fixes an issue where pgAdmin4 GUI does not display properly in IE 11. Fixes #5361
Use the ES5 dist of @simonwep/pickr to make it work on IE.
2020-04-08 11:29:03 +05:30
Dave Page bd0aaf7665 Update yarn.lock 2020-04-07 09:43:54 +01:00
Aditya Toshniwal 134c1802e7 Enable the save button by default when a query tool is opened with CREATE or other scripts. Fixes #4856 2020-04-07 13:54:16 +05:30
Pradip Parkale 33deacacee Ensure that the grant wizard should be closed on pressing the ESC key. Fixes #4206 2020-04-07 13:48:56 +05:30
Aditya Toshniwal d6bc3ccc8b Fixed cursor disappeared issue in the query editor for some of the characters when zoomed out. Fixes #3988 2020-04-07 11:51:19 +05:30
Aditya Toshniwal e1f990190e Added search object functionality. Fixes #2172 2020-04-06 17:33:07 +05:30
Khushboo Vashi f77aa3284f Added LDAP authentication support. Fixes #2186 2020-04-06 15:57:05 +05:30
Pradip Parkale 8ceeb39268 Fixed tab key navigation issue for parameters in table dialog. Fixes #5275 2020-04-06 13:13:21 +05:30
Aditya Toshniwal 4f71dae598 Fixed calendar opening issue on the exception tab inside the schedules tab of pgAgent. Fixes #4512 2020-04-06 12:59:22 +05:30
Dave Page 4da327088c Added an option to prevent a browser tab being opened at startup. Fixes #5353 2020-04-03 19:43:00 +05:30
Dave Page e26a9a25d5 Fixed compilation warnings while building pgAdmin. Fixes #5351 2020-04-03 19:23:32 +05:30
Akshay Joshi 99e4c3350f Fixed RESQL test cases for Packages. 2020-04-03 19:15:40 +05:30
Vishal Sawale 99a72e529b Fixed some accessibility issues:
1) Added missing search filter label in backgrid.
  2) broken aria issue for objects menu.
2020-04-03 17:11:46 +05:30
Aditya Toshniwal 824e3866d8 Replace the existing color picker - spectrum-colorpicker with @simonwep/pickr.
spectrum-colorpicker has accessibility issues and is not maintained since long

Part of #5197
2020-04-03 17:06:47 +05:30
Akshay Joshi ce89ae3c1d Added support of Packages, Sequences and Synonyms to the Schema Diff. Fixes #5264 2020-04-03 16:52:45 +05:30
Vishal Sawale 4036f2a0f2 Fixed accessibility issue for the missing label from the table header. 2020-04-02 12:47:39 +05:30
Murtuza Zabuawala 37f55ccc25 Ensure that switch cell is in sync with switch control for accessibility. Fixes #5314 2020-04-02 12:25:55 +05:30
Aditya Toshniwal 358c5d0a0f Added support for parameter toast_tuple_target and parallel_workers of the table. Fixes #5181
Fixed an issue where the autovacuum_enabled parameter is added automatically in the RE-SQL
when the table has been created using the WITH clause. Fixes #5180
2020-04-01 18:19:55 +05:30
Akshay Joshi a09ada18ee Updated psutil to the latest version 5.7.0 to fix vulnerability issue. 2020-04-01 18:12:38 +05:30
Aditya Toshniwal 88a1e03314 Fixed generated SQL when any token in FTS Configuration or any option in FTS Dictionary is changed. Fixes #5268 2020-04-01 15:03:30 +05:30
Rahul Shirsat 75b6341a84 Ensure that the start and end date should be deleted when clear the selection for pgAgent Job. Fixes #3645 2020-04-01 13:31:36 +05:30
Dave Page e538a4f710 Install rpm-sign. 2020-03-31 17:44:38 +01:00
Dave Page af00296ffe We only need to enable repos on CentOS/RHEL 8. 2020-03-31 17:14:45 +01:00
Dave Page dd7d3c6e23 Fix syntax. Sigh. 2020-03-31 17:12:00 +01:00
Dave Page e576a886d0 Appending signing macros is tricky as the user running the build isn't usually the one running this script. Output instructions instead. 2020-03-31 17:03:48 +01:00
Dave Page f0d077fed8 Attempt to append signing macros to the non-root users config. 2020-03-31 16:59:45 +01:00
Dave Page 37e39ca089 Offer to setup RPM signing macros for the user. 2020-03-31 16:44:34 +01:00
Dave Page 7c2b218076 Install expect. 2020-03-31 16:07:47 +01:00
Akshay Joshi 002fdb33fc Update version for release. 2020-03-30 17:39:33 +05:30
Pradip Parkale 13b65c9a6a Fixed tab key navigation issue for Grant Wizard. Fixes #5241
1) Added entry for .scss to change the shadow of  'ajs-close' button.
  2) allow the user to use the keyboard to update the Backgrid cell DateTime picker control.
2020-03-30 17:31:50 +05:30
Libor M e6118a06e8 Update Czech translation. 2020-03-29 18:31:51 +05:30
Domenico Sgarbossa 63ac71190b Update Italian translation. 2020-03-29 18:29:03 +05:30
Identifier Anonymous 37542ae706 Update Japanese translation. 2020-03-29 18:25:51 +05:30
Fred Escallier 89d4d835ba Update French translation. 2020-03-29 18:23:17 +05:30
Akshay Joshi 9f0ea70945 Update message catalogs. 2020-03-27 19:02:29 +05:30
Akshay Joshi 86e4a88201 Added 'oid-2' to the ignore list of schema diff for all supported nodes. Fixes #5297 2020-03-27 15:27:48 +05:30
Akshay Joshi c002881f66 Added conkey and indkey to the ignore list for schema diff. 2020-03-27 14:41:18 +05:30
Nagesh Dhope f17d4530a3 Fixed focus color issue for Alertify dialog buttons. Fixes #5292 2020-03-26 15:30:31 +05:30
Akshay Joshi 94a76cc9e0 Added support of Domain, Domain Constraints and Types to the Schema Diff. Fixes #5262 2020-03-26 14:30:09 +05:30
Ganesh Jaybhay 4c0b229b14 Fixed an issue where focus doesn't go to the immediate next editable cell after pressing the tab key on switch cell. 2020-03-26 10:50:01 +05:30
Dave Page 17d0d5e0a2 Use NodeJS v12. 2020-03-24 11:37:32 +00:00
Dave Page f97d29243d Don't offer to configure Apache on Redhat platforms as there's nothing to do. 2020-03-24 11:36:54 +00:00
Libor M 94864104e4 Added and fixed gettext usage for better translation coverage. Fixes #5284
1) Fixed usage gettext('') instead of _('') in javascript files.
  2) Fixed usage gettext('') instead of `${gettext('')}` in javascript files,
     because "pybabel extract" not support extracting from this syntax.
2020-03-24 11:14:05 +05:30
Aditya Toshniwal 6988ce96d7 Change some colors and opacity to comply with WCAG color contrast standards. Fixes #5128 2020-03-23 18:15:39 +05:30
Akshay Joshi 98492e7718 Modified RESQL test cases for Foreign Tables to fix the build failures. 2020-03-22 16:26:23 +05:30
Dave Page becb453e7d Use the correct architecture for web packages on Redhat. 2020-03-20 15:48:00 +00:00
Dave Page 35644fdd35 Update supported distro lists. 2020-03-20 14:51:19 +00:00
Dave Page 5ab056759b Use the proper naming convention for .DEB packages 2020-03-20 12:26:10 +00:00
Dave Page e1aeaba942 Simplify PYTHONPATH handling for Sphinx. 2020-03-20 12:07:35 +00:00
Dave Page e256fc32d9 Ensure rpm-build is installed. 2020-03-20 11:50:59 +00:00
Murtuza Zabuawala a7ba446703 Fixed Unicode character issue causing error on Python2 environment. Fixes #5279 2020-03-20 15:17:45 +05:30
Akshay Joshi 26d0a3e5cb Fixed following audit vulnerabilities:
https://www.npmjs.com/advisories/1179
2020-03-20 11:30:27 +05:30
Dave Page 7f571fa7d8 Add mod_wsgi to the built package list. 2020-03-19 13:17:22 -04:00
Dave Page cb600549c3 Don't hard code the architecture. 2020-03-19 12:56:39 -04:00
Dave Page e1cb6d92c5 Update supported distros list. 2020-03-19 12:56:39 -04:00
Dave Page 8812a7db69 Add support for building RPMs on CentOS/RHEL 7 2020-03-19 12:56:39 -04:00
Pradip Parkale 96361656e4 Fixed some accessibility issues in the dialogs:
1) Aria-label additions at few missing places.
  2) Label additions with  'sr-only' class where hidden labels required.
  3) Converted label to span to solve accessibility error.

Fixes #4608
2020-03-19 16:08:51 +05:30
Murtuza Zabuawala 83785da1bc Enhance the color of switch control for both light and dark theme. Fixes #5271 2020-03-19 13:59:03 +05:30
Akshay Joshi 4fe69e825e Added support of Collation, FTS Configuration, FTS Dictionary, FTS Parser, and FTS Template to the Schema Diff. Fixes #5261 2020-03-19 13:54:25 +05:30
Dave Page 6105fc861d Don't ask to continue when installing deps. 2020-03-18 13:00:33 +00:00
Dave Page f156696339 Add support for building RHEL/CentOS 8 RPMs. 2020-03-18 08:51:11 -04:00
Dave Page b6c8707a4d Don't barf if the tree is clean. 2020-03-16 12:40:01 +00:00
Akshay Joshi 3031c5055a Fixed following audit vulnerabilities:
https://www.npmjs.com/advisories/1488
  https://www.npmjs.com/advisories/1490
2020-03-16 15:47:12 +05:30
Akshay Joshi 44c0d76541 Improve logic to get the DDL statements as a part of the comparison. Fixes #5221
Fixed 23 issues related to schema diff.
2020-03-15 14:52:19 +05:30
Dave Page 0b101d9efd Update tested distros list. 2020-03-13 12:36:08 +00:00
Dave Page b69995b34d Use fakeroot to set file ownership as dpkg-deb can't do it itself on older distros. 2020-03-13 12:17:10 +00:00
Dave Page ef6c9fbd6d Setup dependencies as required on Ubuntu 16.04 and Debian 9 2020-03-13 11:55:03 +00:00
Dave Page e43f58d11f Ensure file/directory ownership is correct. 2020-03-12 15:35:43 +00:00
Dave Page a684b48fb3 Add experimental scripts for building Debian/Ubuntu packages.
Code is split into pkg/debian for the Debian/Ubuntu specific parts,
and pkg/linux for generic code that can be used on other distros.

Tested on Debian 10 and Ubuntu 18.04 at present.
2020-03-12 15:24:58 +00:00
Murtuza Zabuawala 7cc30e3216 Fixed chrome driver download utility issue for Ubuntu. Fixes #4942 2020-03-12 11:18:07 +05:30
Ganesh Jaybhay 6586be5158 Fixed some accessibility issues:
1) Screen reader to read elements in radio modern control.
2) Aria-label additions at few missing places.
3) Radiocontrol to have different ids for each option.
2020-03-12 11:09:29 +05:30
Pradip Parkale 1bd14895c3 Fix an issue where the user can not change the value of DateTime picker control using keyboard. Fixes #4237. 2020-03-10 13:21:17 +05:30
Pradip Parkale 82155cd859 Fix an accessibility issue to maximize the panel for all alertify dialog. Fixes #5143 2020-03-06 18:47:22 +05:30
Nagesh Dhope 0ed3cd248b Set Active query details subnode control as read-only instead of disabled for accessibility. 2020-03-06 17:59:57 +05:30
Akshay Joshi 43451fd3f0 Update version for release. 2020-03-02 17:28:20 +05:30
Akshay Joshi 6340c70d7a Update libraries.txt 2020-03-02 10:01:10 +05:30
Domenico Sgarbossa 8e40c8630d Update Italian translation. 2020-03-02 09:54:22 +05:30
Fred Escallier b9a036e5cb Update French translation. 2020-03-02 09:46:41 +05:30
Identifier Anonymous e330407d44 Update Japanese translation. 2020-03-02 09:44:43 +05:30
Akshay Joshi aa127fe0bd Update message catalogs. 2020-02-28 17:55:14 +05:30
Akshay Joshi 16f1e87bb7 Temporary Changed 'yarn audit' command to 'yarn audit --groups dependencies' to
fix the vulnerability found in decompress js package.
2020-02-28 17:29:32 +05:30
Aditya Toshniwal 4db0a6524d Fix an issue where debugger not showing all arguments anymore after hitting SQL error while debugging. Fixes #5101
Added a "Clear All" button to the argument dialog which will clear all the saved arguments values from SQLite DB.
2020-02-28 15:27:01 +05:30
Aditya Toshniwal c9d04684ce Ensure that all the transactions should be canceled before closing the connections when a server is disconnected using pgAdmin. Fixes #5142 2020-02-28 14:12:44 +05:30
Aditya Toshniwal 5262405f06 Fix an issue where pgAdmin4 does not display properly on the IE browser. It's a regression of #5133
There are some changes in the backgrid-select-all.js in vendor directory and the vendor directory
is excluded from webpack compiling. We used ES6 code syntax which does not work on IE.

Code changes are done to use ES5 syntax. Fixes #5219
2020-02-28 12:29:19 +05:30
Aditya Toshniwal 6a90f7c2e1 Update Flask-SQLAlchemy and SQLAlchemy package which is not working on Windows with Python 3.8 Fixes #5214 2020-02-26 11:41:33 +05:30
Akshay Joshi 6d766176c1 Fixed linter error. 2020-02-25 18:41:19 +05:30
Pradip Parkale eaf4781f5f 1) Added accessibility support in AlertifyJS. Fixes #5154
2) Fix accessibility issue for the maximize button of the Alertify dialog. Fixes #5143
2020-02-25 18:23:36 +05:30
Dave Page 787c11efda Fix the docker build. 2020-02-24 15:35:34 +00:00
Aditya Toshniwal fd07e0c868 Fix syntax error when changing the event type for the existing rule. It is a regression of #5115.
Fixes #5215
2020-02-24 18:11:31 +05:30
Aditya Toshniwal 9bad590e9e Improvements in the UI for both default and dark themes. Fixes #5133
Improve the style of the highlighted code after query execution for Dark mode. Fixes #4996.
Changed background pattern for geometry viewer to use #fff for all themes. Fixes #5077
Changed the color of selected and hovered item for Select2 dropdown, also tweak the appearance of the tags in multi-select boxes. Fixes #4955
Fixed Firefox monospaced issue by updating the font to the latest version. Fixes #5184
2020-02-24 14:11:00 +05:30
Akshay Joshi 29c236c33d Ensure that AlertifyJS should not be visible as a title for alert dialog. Fixes #5058 2020-02-24 12:33:23 +05:30
Aditya Toshniwal a44f17a2fc Fix an issue where command and statements were parsed incorrectly for Rules. Fixes #5115
Fixed issue where removing command or statements altogether was not generating modified SQL.
2020-02-24 12:11:19 +05:30
Aditya Toshniwal 915b09255c Added Python 3.8 support. Fixes #5179
1) Upgraded passlib==1.7.1 to passlib==1.7.2
2) Replace unmaintained Flask-Security with maintained Flask-Security-Too package, which is also compatible with python 3.8
3) Other compatibility code changes.
2020-02-18 12:10:38 +05:30
Nagesh Dhope 1964e824c8 Initialize the label and control className for select2 which was missing in the last commit. 2020-02-18 10:58:30 +05:30
Nagesh Dhope 3e10e2c978 Added option to override the class name of a label tag for select2 control. Fixes #5185 2020-02-17 11:58:28 +05:30
Pradip Parkale e9f16a29cf Improve code coverage and API test cases for the Event Trigger module. Fixes #5088 2020-02-14 11:19:34 +05:30
Aditya Toshniwal 019932c323 Enhance logging by tracking stdout and stderr of subprocess when log level set to DEBUG.
If the process terminates abnormally then the error is not logged which makes it very
difficult to find the reason for failure.

Fixes #5176
2020-02-11 14:28:57 +05:30
Akshay Joshi 2ae279a382 Remove the deprecated 'is_xhr' parameter of flask.request object. 2020-02-10 12:31:52 +05:30
Libor M bf88ff1076 Added Czech language support. Fixes #5170 2020-02-10 12:27:36 +05:30
Akshay Joshi 3db961cb0f Fixed ImportError: cannot import name ImmutableDict from werkzeug.
Updated the Flask-WTF version to the latest to fix the above error.
2020-02-10 11:45:11 +05:30
Dave Page 02f90aca0b Fix typo 2020-02-07 10:49:00 +00:00
Murtuza Zabuawala c9500a5122 Set proper focus on tab navigation for file manager dialog. Fixes #5107
- Show focus when the Tab key is pressed
 - Pressing the Enter key on C:\ drive does not open it on Windows
2020-02-07 11:13:41 +05:30
Akshay Joshi 26cdda090e 1) Source/Target database and schema should be selected by default when the user selects any server in the schema diff tool.
2) Added line break for the generated script if select multiple objects.
3) Remove reactivated RM from the release notes.
2020-02-05 14:36:05 +05:30
Paresh More 520b03cb0a Fixed notarization issue on Catalina for pgAdmin4 binaries
- Revert back binary name pgAdmin 4 to pgAdmin.
 - Added timestamp, force and developer bundle_id option for codesign binaries, app, and dmg file.
2020-02-05 14:00:18 +05:30
Paresh More 93e83dddae Fix copy/paste error. 2020-02-04 15:44:42 +00:00
Paresh More 917d08c61e Fix hard notarisation failures. 2020-02-04 15:21:05 +00:00
Domenico Sgarbossa 49c614160d Update Italian translation. 2020-02-04 18:30:28 +05:30
Nagesh Dhope b6173c9d7b Added tab navigation on close buttons for all the panels and create/properties dialog.
Added tab navigation for scroll left and scroll right buttons on the main window.

Fixes #4601
2020-02-04 11:30:33 +05:30
Fred Escallier b0a0a7c50a Update French translation. 2020-02-04 11:09:40 +05:30
Akshay Joshi 1f0728b7d1 Update version for release. 2020-02-03 17:13:05 +05:30
Nidhi Bhammar 59757dbf55 Documentation of the Schema Diff feature. Fixes #5026 2020-02-03 17:08:28 +05:30
Akshay Joshi 641701ca16 Added missing imports and remove unused imports from schema diff. 2020-02-03 15:30:57 +05:30
Akshay Joshi 4f5c3987f1 Update libraries.txt 2020-02-03 15:11:50 +05:30
Akshay Joshi d24a43b1cc Fix feature test, failed due to change the label tag to span tag for the accessibility. 2020-02-03 13:14:28 +05:30
Identifier Anonymous 64a8be3c4f Update Japanese translation. 2020-02-03 12:44:30 +05:30
Akshay Joshi 0d77bc305e 1) Improve wording for script header while generating the script using the schema diff tool.
2) Fixed an issue where closing the query tool panel throws an error.
3) Fixed schema diff close panel issue.
2020-02-03 12:38:02 +05:30
Akshay Joshi 96b0d85189 Update message catalogs. 2020-01-31 21:33:43 +05:30
Khushboo Vashi 3b1c8abd2f Fixed following issue of schema diff tool:
1. Comparison result of 2 exact identical Trigger Functions is different
 2. EPAS 12: Table comparison with the compound trigger shown as different, but all SQL panels are blank
 3. Compound trigger properties panel is not opening
 4. The DDL difference of the table containing the foreign key is not accurate
 5. The DDL difference of the view which refers the table from schema is not accurate
 6. DDL comparison fails if we have procedure with plpgsql in source and edbsql in target
2020-01-31 21:28:08 +05:30
Pradip Parkale 210bbfdbe1 1) Added labels and titles after parsing and validating all the pgAdmin4 web pages for accessibility. Fixes #4770
2) Fixed an issue where Save Password control disappears after clicking on it while creating a server. Fixes #5116
2020-01-31 14:21:35 +05:30
Aditya Toshniwal 0da23b837d Set input controls as read-only instead of disabled will allow tab navigation in the properties tab and also allow screen readers to read it. Fixes #4993 2020-01-31 12:37:44 +05:30
Murtuza Zabuawala 989aa462f7 Set proper focus on tab navigation for file manager dialog. Fixes #5107.
Initial patch sent by Ganesh Jaybhay
2020-01-31 11:43:30 +05:30
Aditya Toshniwal 75a3e92098 Fixed an issue where logout inactive session did not work when a new tab is opened from the already opened tab. 2020-01-31 11:20:45 +05:30
Akshay Joshi 02f9de5bdb Improve wordings. 2020-01-28 18:36:42 +05:30
Khushboo Vashi c418a9c9ca Fixed following schema diff issues:
1) Version mismatch should be displayed if you select EPAS 11 as the source and EPAS 12 as the target.
  2) We should handle schema diff if the user stops the server after compare.
  3) The data type is not visible for column headers in the query tool/view data.
  4) Difference SQL is shown, though source & target SQL are same.
  5) Error is shown when the 'target only' table is selected & clicked on Generate Script.
  6) Difference SQL generated on deleting primary constraints from source throwing error on running from query tool.
  7) Copy button for Difference SQL does not work.
  8) Incorrect SQL is generated when check constraint from the source table is dropped.
  9) Difference SQL is NOT shown when 'Unique Constraint' is dropped from the source table.
 10) In case of difference, no message displayed related to copied successfully or not.
 11) create or replace trigger should be on the next line.
 12) Comparison Result of exactly identical tables having foreign key constraints is shown as different.
 13) The wrong SQL displayed in the difference tab for view and materialized view for the select statements.
 14) Wrong SQL displayed for the procedure in the difference section.
 15) If the user already opens the compare section of Schema diff tool and Disconnects the server then '<' not supported between instances of 'NoneType' and 'int' message displayed.
 16) When 'check constraint' is added on the source table which has already unique constraint & identical target table is created, all SQL panels remain empty.
 17) Difference SQL is NOT shown when after adding 'Foreign Key' constraint to existing source table.
 18) Incorrect SQL is generated when the existing index on the source table is modified.
 19) Wrong SQL displayed for function in difference section.
 20) Additional space is added before & after in difference SQL generated on the addition of an index to the source table.
 21) Difference SQL is NOT shown when tables have different permission/grants.
 22) Incorrect SQL is shown when the source had inherited table & target has a normal table.
 23) Exactly identical child(inherited) tables show difference SQL.
 24) Comparison is NOT working when the custom vacuum is enabled & one of the parameter modified & again custom vacuum is disabled.
2020-01-28 14:53:17 +05:30
Nagesh Dhope f167d77b61 Allow screen-reader to read label & description of non-textable elements. Fixes #4762.
Allow screen-reader to identify the alert errors. Fixes #4763

  Added role alertdialog for confirm and alert dialog.
  Added role status for all status bars/banners.
  Added role alert for error bars.
  Added aria-labelledby for charts on each dashboard.
  Added tabindex for each chart so that it is navigable using tab key.
2020-01-28 11:32:11 +05:30
Akshay Joshi 6594481992 1) Disable Fill Factor and Has OIDs control for the partitioned table.
2) Added reloptions for the partitions and partitioned table.
2020-01-24 16:13:30 +05:30
Akshay Joshi 4faf14b45f Default tablespace should not be visible for the multi-level partitioned table on PG 12 2020-01-24 11:36:00 +05:30
Akshay Joshi 198063f046 Added support for a multi-level partitioned table. Fixes #2554. 2020-01-23 18:49:15 +05:30
Nick Barnes f5d46bf9f1 Fixed an issue while editing char[] or character varying[] column from View/Edit data throwing an error.Fixes #4410. 2020-01-23 14:55:02 +05:30
Aditya Toshniwal fde8e4054a Fixed an issue where Grant wizard unable to handle multiple objects when the query string parameter exceeds its limit. Fixes #4511 2020-01-20 17:53:21 +05:30
Akshay Joshi b4b54d6b94 Fixed API test cases for missing language pack and jasmin test case. 2020-01-20 16:14:12 +05:30
Dave Page 23e218f1b5 Ensure Postfix starts in the container, now it runs as non-root by default. Fixes #5076 2020-01-20 10:41:27 +00:00
Dave Page 33cb649f26 Improve wording 2020-01-20 10:39:48 +00:00
Pradip Parkale 30b4b5b349 Improve code coverage and API test cases for the LANGUAGE module. Fixes #5050. 2020-01-20 13:16:59 +05:30
Akshay Joshi 430e9ae994 Updated the incorrect icon used for the cast node on refresh. Fixes #5065. 2020-01-17 12:10:26 +05:30
Akshay Joshi af56b92af4 Fix an issue where refreshing a package results in the change in the object completely. Fixes #5066. 2020-01-17 12:01:37 +05:30
Aditya Toshniwal e2bfac9e42 Replace node-sass with sass for SCSS compilation. Fixes #5096
This will fix issues reported by the yarn audit. sass is better-maintained library than node-sass.
2020-01-16 14:44:58 +05:30
Yogesh Mahajan 4ab3bbeb82 Improve code coverage and API test cases for the CAST module. Fixes #5049. 2020-01-16 14:34:51 +05:30
Aditya Toshniwal 8c3bba65e5 Logout the pgAdmin session when no user activity of mouse move, click or keypress. Fixes #5000.
Introduced two config params:
1. USER_INACTIVITY_TIMEOUT - Interval in seconds for the timeout. Default is 0-Zero which means disabled.
2. OVERRIDE_USER_INACTIVITY_TIMEOUT - If set to true, tools like query tool or debugger will override USER_INACTIVITY_TIMEOUT
   and will not allow the application to timeout if a query is running for a long time.
2020-01-15 18:07:46 +05:30
Khushboo Vashi d59816054f Schema Diff Improvements:
1. Grid header should be center aligned vertically.
2. Increase the space between object counts.
3. The previous selected objects should not be re-selected on comparison.
2020-01-13 18:19:07 +05:30
Simon Wimmesberger 9dccd20bb3 Fix an issue where setting STORAGE_DIR to empty should show all the volumes on Windows in server mode. Fixes #5025. 2020-01-13 13:20:37 +05:30
Khushboo Vashi 45f2e35a99 Added Schema Diff tool to compare two schemas and generate the difference script.
Currently supported objects are Table, View, Materialized View, Function and Procedure.

Backend comparison of two schemas implemented by: Akshay Joshi

Fixes #3452.
2020-01-10 15:42:09 +05:30
Aditya Toshniwal 8b99a33e6e 1) Ensure that path file name should not disappear when changing ext from the dropdown in file explorer dialog. Fixes #3812.
2) Fix column resizable issue in the file explorer dialog. Fixes #4827.

Used tablesorter's resizable widget.
2020-01-10 12:53:32 +05:30
Nagesh Dhope a54efeddfa Updated wcDocker package which includes aria-label accessibility improvements. Fixes #5072. 2020-01-10 11:58:55 +05:30
Pradip Parkale ed279cac31 Improve the test framework to run for multiple classes defined in a single file. Fixes #5071. 2020-01-10 11:48:36 +05:30
Akshay Joshi be4b8284c5 Fix an issue where select, insert and update scripts on tables throwing an error. Fixes #5074. 2020-01-09 18:23:23 +05:30
Aditya Toshniwal 093d7af748 Remove cheroot server for now until we find a way to shutdown cheroot using REST call. Fixes #5069. 2020-01-07 18:45:07 +05:30
Akshay Joshi 76d04205ef Fix an issue where the table is not created with autovacuum_enabled and toast.autovacuum_enabled for PG/EPAS 12. Fixes #5068. 2020-01-07 17:55:12 +05:30
Akshay Joshi 4080511d9d Fixed linter error. 2020-01-06 18:10:40 +05:30
Akshay Joshi 195e9663da Update version for release. 2020-01-06 17:55:41 +05:30
Akshay Joshi 82c2d50885 Ensure that the user should be able to select/modify tablespace for the partitioned table on v12 and above. Fixes #4950. 2020-01-06 17:45:25 +05:30
Akshay Joshi 2979424db5 Added support to view multilevel partitioned tables. Fixes #4633. 2020-01-06 14:53:47 +05:30
Aditya Toshniwal d4ee869281 Fixed broken tags and tokenizer options of select2. Regression of #5038
With the change of data adapter, we have configured adapters for tags and tokenizers.
We also renamed the method onDemandLoad to showOnScroll to avoid confusion.
2020-01-06 12:47:56 +05:30
Identifier Anonymous df0f6690fd Update Japanese translation. 2020-01-06 11:09:20 +05:30
Fred Escallier c0532f6d13 Update French translation. 2020-01-06 11:09:20 +05:30
Domenico Sgarbossa 4d53d0eb01 Update Italian translation. 2020-01-06 11:09:20 +05:30
Dave Page c9de5f00c6 Add a note to the documentation about the use of non-privileged ports on filesystems that don't support extended attributes when running the container. Fixes #5013 2020-01-03 15:27:52 +00:00
Akshay Joshi 7668d9af08 Update message catalogs. 2020-01-03 19:04:01 +05:30
Navnath Gadakh 66f5a40cd9 Added code coverage tool for pgAdmin. Fixes #5048. 2020-01-03 19:00:08 +05:30
Dave Page a887019337 Remove debugging and incorrect comment. 2020-01-03 10:56:55 +00:00
Dave Page b617a5d89d Remove extra quotes that are doubled. 2020-01-03 10:51:54 +00:00
Dave Page b0877f63b5 Debugging for the automated build 2020-01-03 10:40:03 +00:00
Dave Page 56af090e54 More quoting fixes. 2020-01-03 10:32:18 +00:00
Dave Page fa74a42b34 More quoting fixes. 2020-01-03 10:21:05 +00:00
Dave Page c0595e62ee Fix quoting. 2020-01-03 10:14:13 +00:00
Paresh More f5afc51879 Ensure all binaries are securely signed and linked with the hardened runtime in the macOS bundle. Fixes #5060
Note that this is untested for automated builds, so may require further tweaks.
2020-01-03 09:56:45 +00:00
Dave Page 01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Aditya Toshniwal 964f746d76 Fix syntax highlighting in code mirror for backslash and escape constant. Fixes #4198. 2020-01-01 18:11:47 +05:30
Aditya Toshniwal febbd729ec Ensure that constraints, indexes, rules, triggers, and compound triggers should be created on partitions. Fixes #4842. 2020-01-01 12:59:48 +05:30
Aditya Toshniwal 737f8375fb Added support for on-demand loading of items in Select2. Fixes #5038. 2020-01-01 11:24:16 +05:30
Ganesh Jaybhay fc5287bd9f Added tab navigation for tabs under explain panel in query tool. Fixes #5047. 2020-01-01 10:51:45 +05:30
Nagesh Dhope 8c4dff057f Added aria-label attribute wherever missing for accessibility. 2020-01-01 10:37:17 +05:30
Nagesh Dhope 37f76142fb 1) Added aria-label to buttons used in graphical explain plan.
2) Fixed minor issue where we use dialog tab navigator keyboard shortcut only on visible tabs.
3) Fixed an issue where Zoom in, Zoom out, Zoom to original and Download button should not blur the focus after a click on them.

Initial patch sent by Murtuza Zabuawala.
2019-12-31 13:05:46 +05:30
Aditya Toshniwal cc5c3776ca Refactored SQL of Functions and Procedures. Fixes #5024. 2019-12-31 12:55:18 +05:30
Akshay Joshi ea3eabc3c7 1) Refactored SQL of Table's and it's child nodes. Fixes #4988.
2) Ensure that the error message should not be displayed if Tablespace is not selected while creating the index. Fixes #5008.
3) Fix an issue where operator, access method and operator class is not visible for exclusion constraints. Fixes #5009.
2019-12-20 18:10:50 +05:30
Khushboo Vashi f495af7a76 Refactored SQL of Views and Materialized Views. Fixes #5023. 2019-12-20 17:14:15 +05:30
Akshay Joshi 4b9bfb2e4a Optimized edit types and properties SQL for table/columns. It is part of #4988. 2019-12-20 11:46:10 +05:30
Aditya Toshniwal 15c518f0f1 Use cheroot as default production server for pgAdmin4. Fixes #5017
If DEBUG is true then we used the default flask server.
2019-12-20 11:32:02 +05:30
Aditya Toshniwal a6841bb1e1 Fixed couple of typos for edit types which results in showing proper edit types instead of all data types. 2019-12-18 13:35:58 +05:30
Akshay Joshi 584a200bf0 Updated node alpine image from 8 to 10. 2019-12-17 17:27:34 +05:30
Dave Page 60304e5a46 Clarify file ownership/permission requirements for mapped files in the container. 2019-12-17 10:50:52 +00:00
Aditya Toshniwal f1a18749f6 1) Allow screen-reader to read relationship attributes for tab, tabpanels and tables under it. Similar changes are done for subnode controls.
2) Add role="img" for font icons.

Fixes #4764
2019-12-17 13:22:36 +05:30
Levitt Olivier e29ea15554 Fix an issue where servers.json import fails when running in desktop mode. 2019-12-17 13:15:04 +05:30
Aditya Toshniwal ded71be73f Improved performance while fetching edit types for each column.
Edit types query is executed for every column when open properties dialog of the table.
Change the logic to fetch the edit types for all the distinct column types used in the table at once.
2019-12-16 18:26:22 +05:30
Ashesh Vashi 1f5ccd1c3b Fixed any typo - we were using the function
'TreeNode.prototype.hasParent(...)' to find the server parent node
instead of 'TreeNode.prototype.anyParen(...)'.
2019-12-14 10:31:33 +05:30
Dave Page 8cb239abcb Rename some internal environment variables that could conflict with Kubernetes. Fixes #4999. 2019-12-13 10:42:43 +05:30
Dave Page 8e8f89aa8f Add a warning about the need to chown storage directories. 2019-12-12 15:06:33 +00:00
Karan Takalkar 53f418b9a2 Added more information to the 'Database connected/disconnected' message. Fixes #4943. 2019-12-12 11:12:18 +05:30
Aditya Toshniwal 9bda583d5b Added aria-label to the buttons in the debugger. 2019-12-11 14:52:15 +05:30
Aditya Toshniwal 11bf5fc679 Fix an issue where clicking on an empty textbox like fill factor or comments, considers it as change and enabled the save button. Fixes #4506. 2019-12-11 14:35:14 +05:30
Aditya Toshniwal 43d37e3b4c Fix vulnerability issues reported by 'yarn audit'. Replace the deprecated uglifyjs-webpack-plugin with a terser-webpack-plugin. Fixes #5004. 2019-12-11 14:02:27 +05:30
Fred Escallier 3247223595 Update French translation. 2019-12-09 21:12:39 +05:30
Akshay Joshi 4a87b1387a Update version for release. 2019-12-09 18:05:09 +05:30
Khushboo Vashi cb26ca0e46 Fix XSS issue in explain and explain analyze for table and type which contain HTML. Fixes #4947. 2019-12-09 18:00:56 +05:30
Akshay Joshi f15db03ec3 Added statistics and storage information in reverse engineering SQL of table/column. Fixes #4982. 2019-12-09 15:01:04 +05:30
Dave Page 619c4e1180 Run pgAdmin in the container as a non-root user (pgadmin, UID: 5050). Fixes #4939. 2019-12-09 11:09:46 +05:30
Identifier Anonymous f44627c205 Update Japanese translation. 2019-12-09 10:31:55 +05:30
Domenico Sgarbossa 1b2cd8404a Update Italian translation. 2019-12-09 10:29:54 +05:30
Akshay Joshi 4a2e587123 Update message catalogs. 2019-12-06 19:30:51 +05:30
Aditya Toshniwal 6e2cf8ced2 Changed the open query tool and data filter icons. Fixes #4990. 2019-12-06 19:27:55 +05:30
Akshay Joshi 1a9d365c42 Fix reverse engineering SQL issue where when clause is not visible for PG/EPAS 12. Fixes #4976. 2019-12-06 19:01:55 +05:30
Aditya Toshniwal f8e443bda7 Fix scrolling issue in 'Users' dialog. Fixes #4220. 2019-12-05 17:50:19 +05:30
Dave Page 1bdb7d33fc Fix typo 2019-12-05 06:35:57 -05:00
Aditya Toshniwal 75ac259632 Fix issue where the user can not switch the UI language. It's a regression of #4348. Fixes #4975 2019-12-05 14:34:44 +05:30
Aditya Toshniwal 0bd26222d8 Fix query tool launch error if user name contains HTML characters. It's a regression. Fixes #4674. 2019-12-05 13:13:33 +05:30
Akshay Joshi f8e1973bc2 Fix reverse engineering SQL issue for partitions when specifying digits as comments. Fixes #4893. 2019-12-05 12:55:52 +05:30
Akshay Joshi 6c7fe644e5 Fix reverse engineering SQL issue for triggers when passed a single argument to trigger function. Fixes #4958. 2019-12-05 11:45:47 +05:30
Murtuza Zabuawala f901eeeb4a Fix an issue where context menu is open along with submenu and the focus is not on context menu or submenu. Fixes #4991. 2019-12-05 11:14:59 +05:30
Aditya Toshniwal b9c7a9e887 Fix the feature tests which were failing after the accessibility commit.
The reason being, the span elements which was used to show properties tab
data are changed to input now as per accessibility requirements.
2019-12-04 18:02:53 +05:30
Shubham Agarwal 5093e6db5e Fixed following issues for feature test:
1. Modified the get_chromedriver utility for supporting python version below 3.5.
2. Handled some exceptions getting intermittently on some databases.
3. Generalized some functions with additional parameters.
4. Disabled the auto-expansion of the children nodes for maintaining the synchronization.
2019-12-03 19:35:48 +05:30
Akshay Joshi f7cc79fab1 Fix an issue where the inherited table name with quotes did not escape correctly. Fixes #4985. 2019-12-03 19:31:32 +05:30
Akshay Joshi 9110703aaa Fix 'Could not find the object on the server.' error while refreshing the check constraint. Fixes #4966. 2019-12-03 14:18:45 +05:30
Aditya Toshniwal 0a67b2ecb9 Added aria-label to provide an invisible label where a visible label cannot be used. Fixes #4772. 2019-12-03 12:47:42 +05:30
Khushboo Vashi d476343b99 Enhance the logic to change the label from 'Delete/Drop' to 'Remove' for the server and server group node. Fixes #4923 2019-12-03 11:52:02 +05:30
Dave Page ac2bd5e6ee Use a 'play' icon for the Execute Query button in the Query Tool for greater consistency with other applications. Fixes #4711 2019-12-02 20:44:54 -05:00
Dave Page 246a475600 Allow Gunicorn logs in the container to be directed to a file specified through GUNICORN_ACCESS_LOGFILE. Fixes #4944 2019-12-02 20:14:01 -05:00
Khushboo Vashi ae2aadeede Fix an issue where pgAdmin4 unable to retrieve table node if the trigger is already disabled and the user clicks on Enable All. Fixes #4953. 2019-12-02 15:26:36 +05:30
Akshay Joshi d95e8db4ee Fix an issue of retrieving properties for Compound Triggers. It's a regression of #4006. Fixes #4952. 2019-12-02 15:01:54 +05:30
Khushboo Vashi cccc6e5676 Added role=status attribute to all the status messages for accessibility. Fixes #4773. 2019-12-02 14:15:31 +05:30
Aditya Toshniwal c4facc04d3 Fix pgAdmin4 failed to start issue after upgrading to version 4.15. Fixes #4978 2019-12-02 11:40:48 +05:30
Rahul Shirsat d98e86d3df Warn the user on changing the definition of Materialized View about the loss of data and its dependent objects. Fixes #4396 2019-12-02 11:25:51 +05:30
Fahar Abbas 623ff4f91f Allow drag and drop functionality for all the nodes under the database node, excluding collection nodes. Fixes #4435 2019-12-02 09:35:20 +05:30
Akshay Joshi 4fa1bdba5a 1) Refactored code of columns node. Fixes #4938.
2) Fix an issue where length and precision are not removed from table/column dialog. Fixes #4964.
3) Fix an issue where the Interval data type is not displayed in the properties dialog of table/column. Fixes #4965.
4) Fix an issue where the wrong type is displayed when changing the datatype from timestamp with time zone to timestamp without time zone. Fixes #4761.
5) Change the label from 'Length and Precision' to 'Length/Precision and Scale' for columns.
6) The maximum length for datatype like interval, timestamp with time zone, time with time zone, etc.. is 6. Set the max length to 6 instead of 10.
2019-11-28 18:48:53 +05:30
Aditya Toshniwal 4ed2d74d9c 1) Fix network disconnect issue while establishing the connection via SSH Tunnel and it impossible to expand the Servers node. Fixes #4724.
2) Fix server connection drops out issue in query tool. Fixes #4818
3) Fix VPN network disconnect issue where pgAdmin4 hangs on expanding the Servers node. Fixes #4926.
4) Ensure that the Servers collection node should expand independently of server connections. Fixes #4933.

Set the default connection timeout to 10 seconds instead of 0.
2019-11-26 09:04:41 +05:30
Abhilasha Narendra 700e01708b Updated documentation for default privileges to clarify more on the grantor. Fixes #4659. 2019-11-26 08:33:59 +05:30
Rahul Shirsat 1a39dedc62 Add Reverse Engineered and Modified SQL tests for Materialized Views. Fixes #4696. 2019-11-25 11:11:09 +05:30
Abhilasha Narendra a03b8b4f76 Updated the json file name from 'servers.json' to 'pgadmin4/servers.json' in the container deployment section of the documentation. Fixes #4836. 2019-11-25 10:45:05 +05:30
Shubham Agarwal ae462ed099 Fixed following feature tests:
1) Handled click event in query tool due to intermediate clicking issue.
2) Observed that the database is not getting created in a test case, so failed the test case there only.
2019-11-21 17:20:27 +05:30
Aditya Toshniwal 5316a28e6c Fixed issue where Dark Theme is unavailable in python wheel distro.
pgAdmin wheel distro is not having pgadmin.themes.json file in 'web/pgadmin/misc/themes' directory,
so it's better to refer this file from the generated directory.
2019-11-20 15:05:20 +05:30
Akshay Joshi bb845817d6 Fix vulnerability issue for package 'mem', which is a dependency module for eclint.
Remove unused eclint module from the package.json
2019-11-20 14:47:04 +05:30
Shubham Agarwal 425cc2a966 Fix some more feature tests:
1. Added an attribute 'data-click-counter' in query execute button which gets incremented
   once query button is clicked up to 9 and then reset to 0. This is added just to support automation.
2. Locator for login_group_role is added and used to expand tree.
3. Functions for enabling and disable auto_commit and auto_rollback are made more precise.
4. Some scrolling problem is addressed in view_data_dml_query test.
5. Handled the stale element reference exception in query_tool_journey_test
2019-11-20 12:50:04 +05:30
Shubham Agarwal dc47c8f898 Fixed following feature tests:
1. Process watcher loading logs fix
2. Auto commit/rollback issue in query_tool_tests
3. Fixed the scrolling issue while verifying values in a table.
4. Modified some functions in pgadmin_page.py
2019-11-15 18:02:17 +05:30
Akshay Joshi de878b3198 Refactored code of table and it's child nodes.
1) Remove duplicate logic.
2) Child node specific logic should be inside the child node and table node gets the required information from the respective child node.

Note:- Refactoring of columns node still in progress.

Fixes #4807
2019-11-15 14:45:55 +05:30
Aditya Toshniwal 00ce130286 Shown some text on process watcher till the initial logs are loaded. Fixes #4925 2019-11-15 12:12:19 +05:30
Aditya Toshniwal 3ff4dfd02d Fix issue where the Reset button does not get enabled till all the mandatory fields are provided in the dialog. Fixes #3538 2019-11-15 11:51:06 +05:30
Nagesh Dhope 397a1b9616 Fix main window tab navigation accessibility issue:
1) Dashboard -> Server Activity grid: terminate the session, cancel active button not navigable using tab key.
2) SQL -> If the focus inside code mirror control tab navigation not working.

Fixes #4930
2019-11-15 11:31:19 +05:30
Murtuza Zabuawala 6a5d98cf19 Fix accessibility issues:
1) Suppress ESC key presses in Alertify dialogues when the come from Select2 controls (It also closes the alertify dialog when user try to close Select2 using ESC key)
2) Do not allow Tabindex focus on Switch control when it is disbaled
3) Tab keyboard shortcut navigation does not work in wcDocker iframe.

Fixes #4935
2019-11-15 11:06:00 +05:30
Akshay Joshi f22134dabd Ensure that the superuser should be able to create database and role, as the superuser
overrides all the access restrictions.
Fixes #4792 Fixes #4878
2019-11-14 18:14:53 +05:30
Domenico Sgarbossa b7d7bda93a Update Italian translation. 2019-11-14 17:58:06 +05:30
Dave Page 3d4d40fa02 Fix the help button link on the User Management dialog. Fixes #4934 2019-11-14 11:51:26 +00:00
Aditya Toshniwal 42cd2a2276 Set browser autofill color as primary light to highlight autofill. This works only on WebKit browsers. 2019-11-13 11:35:09 +05:30
Shubham Agarwal 7b568cfce2 Fixed feature tests related to process watcher. 2019-11-13 11:19:21 +05:30
Fred Escallier 00ebc58795 Update French translation. 2019-11-12 20:01:34 +05:30
Aditya Toshniwal 79e04d5e23 Customize the scrollbar stying. Added new SASS variable to change the color as per theme. 2019-11-12 19:38:35 +05:30
Aditya Toshniwal 636ab29669 Further changes to the welcome dashboard for theme customization. 2019-11-12 17:53:52 +05:30
Akshay Joshi fb87920bbb Fixed docker container exit issue occurs due to change in Gunicorn's latest version.
Updated Dockerfile and hardcoded Gunicorn version to 19.9.0

Fixes #4924
2019-11-12 17:48:10 +05:30
Akshay Joshi 8a03c42bd4 Update version for release. 2019-11-12 08:20:43 +05:30
Dave Page 5b00ad0336 Remove extra whitespace. 2019-11-11 14:55:53 +00:00
Dave Page 314990447c Ensure compatibility with older versions of Sphinx. 2019-11-11 14:54:43 +00:00
Dave Page 664d9a2144 Support older versions of Sphinx 2019-11-11 14:51:11 +00:00
Aditya Toshniwal c1c682402a 1) Further styling tweaks for Dark Theme.
2) Theme related code changes are removed from config.py and moved to miscellaneous under a new package - "themes".
2019-11-11 18:47:43 +05:30
Akshay Joshi 7282e15ee2 Fixed API and RESQL test cases for Compound Trigger after the recent changes in EPAS 12.
EPAS 12 Changes:
   Fix server crash when the compound trigger has both row and statement-level triggers having
   WHEN clause containing NEW/OLD vars.
2019-11-11 17:22:50 +05:30
Shubham Agarwal b48121335c Fixed feature tests.
Changes included:
  1. Created function for traversing the browser tree.
  2. Fixed some synchronization issues.
  3. Modified locators.
  4. Test cases fix for the recent commits.
2019-11-11 10:49:00 +05:30
Identifier Anonymous ea0c077180 Update Japanese translation. 2019-11-11 09:51:20 +05:30
Akshay Joshi c11bed3819 Update message catalogs. 2019-11-08 18:50:00 +05:30
Murtuza Zabuawala 022cf3d93c Fixed an issue where keyboard shortcut for context menu is not working when using Firefox on CentOS7. Fixes #4906 2019-11-08 18:41:57 +05:30
Nagesh Dhope 2522c8c9e2 Fixed an issue where escape key not working to close the open/save file dialog. Fixes #4896 2019-11-08 18:26:46 +05:30
Dave Page 475a717cd6 Add navigation links to the bottom of the docs, and embiggen the font a touch. 2019-11-07 16:37:54 +00:00
Dave Page 4c192393b0 Tone down the primary FG colour in dark mode a touch. 2019-11-07 14:24:42 +00:00
Dave Page 9961a6c101 Remove extra space. 2019-11-07 14:15:13 +00:00
Dave Page c3c3e802ca Fix wrapping. 2019-11-07 14:13:22 +00:00
Dave Page 1ebf7948c6 Quick tweak to increase the contrast of dark mode a little prior to a real review of the colours tomorrow. 2019-11-07 14:09:51 +00:00
Akshay Joshi f98136cd99 Correct the issue number for the previous commit. Fixes #4173 2019-11-07 19:01:29 +05:30
Aditya Toshniwal 8180403f97 1) Added support for custom theme creation and selection. Fixes #4348.
2) Added Dark(Beta) UI Theme option. Fixes #3741.
3) Fix an issue where a black arrow-kind image is displaying at the background of browser tree images. Fixes #4171

Changes include:
  1) New theme option in preferences - Miscellaneous -> Themes. You can select the theme from the dropdown.
     It also has a preview of the theme just below the dropdown. Note that, a page refresh is needed to apply changes.
     On saving, a dialog appears to ask for refresh.
  2) You can create your own theme and submit to hackers. README is updated to help you create a theme. Theme will be available only after the bundle.
  3) Correction of SASS variables at few places and few other CSS corrections.
  4) Added iconfont-webpack-plugin, which will convert all the SVG files(monochrome) used as icons for buttons to font icons.
     This will allow us to change the color of the icon by using CSS color property.
  5) All the .css files will bundle into a separate file now- pgadmin.style.css. This will help reduce the size of
     theme CSS files as CSS in .css files will not change with the change of SASS variables.
2019-11-07 18:51:03 +05:30
Rahul Shirsat 62d55cabd9 1) Fixed issue where Drop and Disconnect connection menu points are too close to each other. Fixes #3279
2) Rename the context menu from 'Drop Server' to 'Remove Server'. Fixes #3859
2019-11-07 13:11:24 +05:30
Dave Page 091d2cd0d2 Fixed an issue where psql of v12 throwing "symbol not found" error while running Maintenance and Import/Export.
Copy libpq.so.5.12 from pg12-builder to the final container and create a symbolic link. 

Fixes #4835
2019-11-07 12:12:43 +05:30
Ganesh Jaybhay 69fba93152 Fixed potential issue in reset function for nested objects.
Reset function clears the model instead of storing previous values.

Fixes #4895
2019-11-05 14:47:07 +05:30
Aditya Toshniwal 570ee58f53 Add an option to request confirmation before cancelling/resetting changes on a Properties dialog. Fixes #4351 2019-11-05 14:28:03 +05:30
Aditya Toshniwal e10b58e4ca Ensure create new object dialog should be opened when alt+shift+n key is pressed on the collection node. Fixes #3130 2019-11-05 11:20:03 +05:30
Aditya Toshniwal 080ccdda5b Remove arbitrary (and incorrect) requirement that composite types must have at least two members. Fixes #4451 2019-11-01 15:21:59 +00:00
Aditya Toshniwal a7d8b9de8c Ensure that units are respected when sorting by file size in the File dialog. Fixes #4647 2019-11-01 15:00:34 +00:00
Aditya Toshniwal 30c7effa50 Fix the toggle case shortcut key combination. Fixes #3999 2019-11-01 12:10:14 +00:00
Aditya Toshniwal f85efb2797 Handle NULL values appropriately when sorting backgrid tables. Fixes #4242 2019-11-01 12:04:40 +00:00
Aditya Toshniwal f8e0b54836 Ensure comments are shown in reverse engineered SQL for table partitions. Fixes #4191 2019-11-01 11:58:38 +00:00
Aditya Toshniwal 131a944e24 Support Enable Always and Enable Replica on triggers. Fixes #4006 2019-11-01 11:49:17 +00:00
Abhilasha Narendra ab5d954337 1) Updated documentation for the delete row button that only strikeout the row instead of deleting it. Fixes #4734
2) Updated documentation for the query tool toolbar buttons. Fixes #4779
2019-10-31 19:40:18 +05:30
Aditya Toshniwal 4bec7df33b Suppress Enter key presses in Alertify dialogues when the come from Select2 controls to allow item selection with Enter. Fixes #4610 2019-10-30 10:42:06 +00:00
Aditya Toshniwal fbc3e2d0e7 Don't warn the user before saving changes. 2019-10-30 10:13:29 +00:00
Aditya Toshniwal 4f9d2de8cd Ensure Javascript errors during Query Tool execution are reported as such and not as Ajax errors.. Fixes #4564 2019-10-29 15:51:28 +00:00
Dave Page 18b7483cc4 Correct the issue number for the previous commit (c25034a8). Fixes #4351 2019-10-29 14:34:51 +00:00
Aditya Toshniwal c25034a86d Add an option to request confirmation before cancelling changes on a Properties dialog. Fixes #4315 2019-10-29 14:31:43 +00:00
Dave Page 7408b8c8d9 PEP-8 fix. 2019-10-29 12:18:49 +00:00
Aditya Toshniwal 06022dfd7e Fix an issue in the Query Tool where shortcut keys could be ignored following a query error. Fixes #3915 2019-10-29 11:51:01 +00:00
Richard Yen 30e9673375 Give appropriate error messages when the user tries to use an blank master password. Fixes #4341 2019-10-25 13:55:07 +01:00
Aditya Toshniwal 2182dc3cc5 2 fixes for the backup dialogue when using directory format:
Ensure compression level is passed to pg_dump when backing up in directory format. Fixes #4482
Ensure the number of jobs can be specified when backing up in directory format. Fixes #4483
2019-10-25 13:21:53 +01:00
Aditya Toshniwal 1f6a0a87f6 Ensure all messages are retained in the Query Tool from long running queries. Fixes #4730 2019-10-25 12:38:46 +01:00
Aditya Toshniwal 6d7ff9444a Don't quote bigints when copying them from the Query Tool results grid. Fixes #4459 2019-10-25 11:53:39 +01:00
Aditya Toshniwal 4125360dfb Ensure the correct "running at" agent is shown when a pgAgent job is executing. Fixes #3913 2019-10-25 11:39:40 +01:00
Aditya Toshniwal a804485a4c Ensure context menus never get hidden below the menu bar. Fixes #3789 2019-10-25 11:31:25 +01:00
Aditya Toshniwal 02642628b0 Added encrypted password in reverse engineered SQL for roles. Fixes #1974. 2019-10-23 13:16:36 +05:30
Ganesh Jaybhay 5b438e13cc Fixed potential error in the properties dialog for the Code tab. Fixes #4845. 2019-10-18 17:38:15 +05:30
Nagesh Dhope 687fe617cc Fixed an issue where Datetimepicker control opens when clicking on the label.
Change the click event to 'click .input-group'.

Fixes #4850
2019-10-18 17:37:57 +05:30
Usman Muzaffar 03391a07e0 Fixed minor issue in feature tests.
Signed-off-by: Akshay Joshi <akshay.joshi@enterprisedb.com>
2019-10-18 17:37:33 +05:30
Paresh More e987fe9d37 Ensure the MAC OSX app should be notarized for Catalina.
Added post-build script in Jenkins to notarize appbundle.

Fixes #4817
2019-10-16 11:23:32 +05:30
Akshay Joshi d7b1e2cd9c Update version for release. 2019-10-15 14:27:56 +05:30
Akshay Joshi 2790689d26 1) Fix issue where validate switch for the foreign key is enabled from table dialog even if the key is validated.
2) Fix issue where validate the foreign key from the table dialog, rename the foreign key constraint to none.
2019-10-14 18:19:32 +05:30
Akshay Joshi 7c271d21ae Fix 'placeholders are incompatible' issue in the message catalog.
Replace % with %% used in the explain module.
2019-10-14 12:51:34 +05:30
Identifier Anonymous 75e2167165 Update Japanese translation. 2019-10-14 12:09:28 +05:30
Akshay Joshi 94170757e8 Update message catalogs. 2019-10-11 17:36:02 +05:30
Dave Page 9bdb5ea5e0 Include PostgreSQL 12 binaries in the container. Fixes #4823 2019-10-11 11:13:06 +01:00
Akshay Joshi c3e11bd390 Fix issue where VALID foreign keys show as NOT VALID in the SQL tab for tables.
Corrected the condition for valid foreign key.

Fixes #4791
2019-10-10 18:55:13 +05:30
Aditya Toshniwal d056a94f0c popen() function strips the quotes from the arguments, so backup fails
for the schema name that needs quoting.

Code is changed to add escapers.

Fixes #4590
2019-10-10 17:58:32 +05:30
Aditya Toshniwal f16498a8a7 Optimize Webpack to improve overall performance.
Changes include:
1) Remove underscore-string and sprintf-js packages as we were using only %s. Instead, added a function to do the same. Also changed gettext to behave like sprintf directly.
2) backgrid.sizeable.columns was not used anywhere, removed. @babel/polyfill is deprecated, replaced it with core-js.
3) Moved few css to make sure they get minified and bundled.
4) Added Flask-Compress to send static files as compressed gzip. This will reduce network traffic and improve initial load time for pgAdmin.
5) Split few JS files to make code reusable.
6) Lazy load few modules like leaflet, wkx is required only if geometry viewer is opened. snapsvg loaded only when explain plan is executed. This will improve sqleditor initial opening time.

Reviewed By: Khushboo Vashi
Fixes #4701
2019-10-10 12:05:28 +05:30
Akshay Joshi e5638b520d Feature test should work with Python 2.7.
Import print_function from __future__
2019-10-09 11:57:35 +05:30
Ashesh Vashi 6e4923d762 Fixes # 4778 - Implement the query plan analyzer
Look 'n' Feel and implementation logic are inspired from
'http://explain.depsez.com'.

It now creates three tabs under the 'Explain' panel when executing a
query using the Explain Analyze/Explain button from the toolbar of the
Query tool.

Graphical
---------
-> Graphical Explain Plan

Analysis
--------
-> Table to show details of the explain plan analyse.
-> Each row represents the statistics per Explain Plan Node
-> It may contains columns like node information, exclusive timing
   (time spent for this explain node excluding the child nodes),
   inclusive timing, actual rows, plan rows,
   rowsx (misestimation between planned vs actual rows), loop.
-> Background color of exclusive, inclusive, rows changes based on
   their values.
i.e.
If Percentage of exclusive, and inclusive timings of total query time
is:
> 90 - Red Color
> 50 - Orange (Between Red & Yellow Color)
> 10 - Yellow color

If planner misestimation for the rows is
> 1000 times - Red Color
> 100 times - Orange (Between Red & Yellow Color)
> 10 times - Yellow Color
Also - if actual rows <= planned rows then it shows up arrow, else it
shows down arrow.

Statistics
----------
-> It contains a HTML table for the statistics per Node Type, and
   a HTML table for the statistics per table.

Reviewed by: Akshay Joshi
2019-10-08 16:44:24 +05:30
Akshay Joshi 1e4fd552ac Ensure backup a partition table should not backup the whole database.
For the partition table same argument '--table' is used with pg_dump.

Fixes #3386
2019-10-07 16:32:37 +05:30
Akshay Joshi 55c6fa0d93 Fix an error where 'false' string is displayed when we add a new parameter in the Parameters tab,
also clear the old value when the user changes the parameter name.

Corrected the implementation of BooleanCellFormatter.

Fixes #4753
2019-10-07 16:00:28 +05:30
Akshay Joshi 7489c372e5 The search path should not be quoted while setting as a parameter, if it is
quoted then that string considers to be a single schema.

Quoting not added for the 'search_path' parameter.

Fixes #4760, #4780
2019-10-07 12:28:00 +05:30
Dave Page 893ef4701d Fix the default value for PROXY_X_PROTO_COUNT per Aditya. 2019-10-04 12:34:59 +01:00
Aditya Toshniwal 41ee58e79a Highlighted the color of closing or opening parenthesis when user select them in CodeMirror. Fixes #4728 2019-10-04 13:55:00 +05:30
Akshay Joshi bf2c001c87 Export job fails when deselecting all the columns.
Select2 parameter 'first_empty' should be set to false for the controls of type array.
If it is true then on deselecting/clearing all the values, an empty entry is still there. 

Fixes #4751
2019-10-04 13:00:39 +05:30
Aditya Toshniwal 245a6e6f57 Added backward compatible code for reverse proxy in case werkzeug is older.
Make werkzeug greater than equal to 0.15.0
2019-10-01 17:55:43 +05:30
Dave Page 6c662ae672 PEP-8 fix. 2019-09-27 11:16:08 +01:00
Dave Page 8249e66419 Tidy up formatting and wording. 2019-09-27 10:51:18 +01:00
Aditya Toshniwal 6032692de0 Unable to open Query tool on Internet Explorer.
Remove extra comma in the function argument while starting the query tool.
Other browsers had no problems, but it is an issue on Internet explorer.

Fixes #4769
2019-09-27 14:32:52 +05:30
Akshay Joshi c580c9d4b3 Fix PEP8 issue 2019-09-27 14:27:50 +05:30
Akshay Joshi 8e974b80ca Fix documentation issue single quote is not allowed in reStructuredText. 2019-09-27 13:45:09 +05:30
Aditya Toshniwal faf8062830 pgAdmin4 unable to work behind Nginx reverse proxy running on a non-standard port.
Werkzeug middleware allows us to set the number of trusted ports and few other params
behind the proxy. By default values are set to zero.

Added 'X-Forwarded-*' configuration options and set the default value of the port to 1 to work with non-standard port.

Fixes #4768
2019-09-27 13:24:35 +05:30
Khushboo Vashi 56e00d74ad There is no option to Copy data with headers from Query Tool/View Data.
Added drop-down 'Copy with headers' near to the copy button in Query Tool/View Data.

Fixes #3009
2019-09-27 12:14:39 +05:30
Akshay Joshi 051e5038b5 Fix issue where query history is not visible in the query history tab. Fixes #4777 2019-09-25 13:18:33 +05:30
Akshay Joshi c54017eac5 Add Reverse Engineered and Modified SQL tests for Synonyms. Fixes #4472 2019-09-24 18:33:07 +05:30
Aditya Toshniwal 73dc130908 Fix issue where pgAdmin does not load completely if loaded in an iframe. Fixes #4756 2019-09-23 12:55:02 +05:30
Aditya Toshniwal 82aa2d1819 Ensure that pgAdmin should work behind reverse proxy if the inbuilt server is used as it is. Fixes #4755 2019-09-23 11:50:32 +05:30
Akshay Joshi 1bef98fdfa Ensure that 'ENTER' key in the data filter should not run the query. Fixes #4199 2019-09-20 18:13:44 +05:30
Akshay Joshi faa6236580 Add Reverse Engineered and Modified SQL tests for Unique Constraints. Fixes #4628 2019-09-20 12:12:01 +05:30
Dave Page a1b0139c9b Don't use Python to get the app details from the Makefile. Fixes #4757 2019-09-19 09:58:44 +01:00
Akshay Joshi f881542834 Fix RESQL/MSQL test cases for Python 2.7 2019-09-17 11:41:57 +05:30
Akshay Joshi e64d6edc73 Update version for release. 2019-09-17 11:06:58 +05:30
Akshay Joshi b10378fe70 Fix query history issue for Python 2.7, it is a regression of #4750. 2019-09-17 11:01:13 +05:30
Murtuza Zabuawala 80b05973c6 Fix query history exception for Python 3.6. Fixes #4750. 2019-09-16 19:09:22 +05:30
Akshay Joshi 426d9d5872 Fix SQL issue of length and precision when changing the data type of Column. Fixes #4698 2019-09-16 18:57:57 +05:30
Dave Page 110a51c5b2 Refactor Dockerfile to avoid needing to run supporting scripts (i.e. 'docker build .' will work) and minimise layers. Fixes #4752 2019-09-16 13:48:11 +01:00
Khushboo Vashi aa668856f7 1) Add Reverse Engineered and Modified SQL tests for Primary Keys. Fixes #4624.
2) Ensure Primary Key should be created with Index. Fixes #4742.
2019-09-16 12:05:29 +05:30
Murtuza Zabuawala d923dcf98b Added MSQL test cases for Roles. 2019-09-16 11:41:48 +05:30
Identifier Anonymous 6e7759f1d5 Update Japanese translation. 2019-09-16 11:30:20 +05:30
Akshay Joshi 2acd2a5615 Update message catalogs. 2019-09-13 18:13:21 +05:30
Akshay Joshi f5a6df4ddb Fix issue where EXEC script doesn't write the complete script for Procedures. Fixes #4727 2019-09-13 16:58:25 +05:30
Akshay Joshi da553eec9b Ensure port and username should not be mandatory when a service is provided. Fixes #4642 2019-09-13 11:54:16 +05:30
Aditya Toshniwal 9a69d27009 Fix webpack issue where multiple assets emit to the same file. 2019-09-13 11:08:08 +05:30
Aditya Toshniwal 83170a0e94 Fix display of validation error message in SlickGrid cells. Fixes #4408 2019-09-12 20:27:44 -04:00
Akshay Joshi 6d8c53bffd Fix query tool and view data issue with the Italian language. Fixes #4736 2019-09-12 17:20:35 +05:30
Akshay Joshi 7944e75695 Ensure sequence with negative value should be created. Fixes #4726 2019-09-12 14:18:30 +05:30
Dave Page 31653aef70 Remove quotes that shouldn't be there. 2019-09-11 16:00:53 -04:00
Akshay Joshi 6a931588aa 1) Add Reverse Engineered and Modified SQL tests for Foreign Keys. Fixes #4616
2) Fix issue where Validated switch option is inverted for the Foreign Key. Fixes #4412
2019-09-11 15:59:13 +05:30
Dave Page b4a754bdc0 Remove copy of file that's now created on the fly. 2019-09-09 13:35:55 -04:00
Domenico Sgarbossa 199844e82c Italian translation improvements. 2019-09-09 11:33:51 +05:30
Nagesh Dhope db06dd0275 Add msql tests for FTS Dictionaries 2019-09-06 16:00:33 +01:00
Dave Page 72505b27cb Update feature test to support changed editor options. 2019-09-06 13:32:13 +01:00
Nagesh Dhope 9f26e7ed20 Added MSQL test cases for Extension. 2019-09-06 16:28:41 +05:30
Akshay Joshi 8e4e8b3e5a 1) Add Reverse Engineered and Modified SQL tests for Indexes. Fixes #4621
2) Fix modified SQL for Index when reset the value of Fill factor and Clustered?. Fixes #4702
3) Fix reversed engineered SQL for btree Index when provided sort order and NULLs. Fixes #4703
2019-09-06 14:10:46 +05:30
Akshay Joshi 9eff2e9926 Modified RE-SQL/MSQL test cases of foreign tables for EPAS 9.4 and 9.5 2019-09-05 12:01:03 +05:30
Aditya Toshniwal 1c2ba72f02 Add editor options for plain text mode and to disable block folding to
workaround rendering speed issues in CodeMirror with very large scripts.
Fixes #4631.

Re-arrange editor options in the Preferences dialogue to tidy things up.
2019-09-04 15:46:08 +01:00
Akshay Joshi 5e54f20578 Add Reverse Engineered and Modified SQL tests for Foreign Tables. Fixes #4618. 2019-09-04 18:33:07 +05:30
Ashesh Vashi 2d4429fa64 Update yarn.lock to update the vulnerable javascripts
i.e.
eslint-utils >= 1.4.1
2019-09-04 10:20:28 +05:30
Ganesh Jaybhay 85baa22ca1 Added Modified SQL test cases for FTS Configurations. 2019-09-03 17:42:44 +05:30
navnath gadakh 4690700a24 Added Modified SQL test cases for Packages. 2019-09-03 17:33:57 +05:30
Akshay Joshi 4745ad56e9 1) Add Reverse Engineered and Modified SQL tests for Foreign Servers. Fixes #4617
2) Add Reverse Engineered and Modified SQL tests for User Mappings. Fixes #4627
2019-09-03 16:27:41 +05:30
Aditya Toshniwal 04357b7a55 Fix error while importing data to a table using Import/Export dialog and providing Not null columns option. Fixes #4461. 2019-09-03 11:19:33 +05:30
Shubham Agarwal a0f6e5272a Add MSQL test cases for FTS Parser. 2019-09-03 10:28:11 +05:30
Murtuza Zabuawala eeeb350ed2 Add Modified SQL tests for Resource Group. Fixes #4690 2019-09-03 10:18:09 +05:30
Aditya Toshniwal a68f0702e2 Re-fix database name unescaping the query tool title bar. 2019-09-02 16:57:28 +01:00
Domenico Sgarbossa 60a6c501fb Add an Italian translation. 2019-09-02 13:35:32 +01:00
Akshay Joshi 5ff3f40116 Add Reverse Engineered and Modified SQL tests for FTS Templates. Fixes #4619 2019-09-02 15:24:41 +05:30
Akshay Joshi 662266a367 Added MSQL test cases for Cast and Language. 2019-09-02 14:11:59 +05:30
Aditya Toshniwal bc91a7c7b2 Increase cache control max age for static files to improve performance over longer run. Fixes #4681 2019-09-02 12:17:43 +05:30
Neel Patel 0ca65d7cfe Added MSQL test cases for Domain. 2019-09-02 11:52:19 +05:30
Aditya Toshniwal 47f26cc377 Fix exception in query history for python 2.7. Fixes #4663 2019-08-30 09:07:03 +05:30
Akshay Joshi e0c53e7d1d Add Reverse Engineered SQL tests for Schemas. Fixes #4575 2019-08-29 18:32:08 +05:30
Aditya Toshniwal d6da1cf25c Added MSQL test cases for Sequences and cover missing ACL RE-SQL test cases. 2019-08-29 14:15:34 +05:30
Shubham Agarwal fc4bef56a0 Further code refactoring to stabilise the Feature Tests. Fixes #3936 2019-08-28 18:04:08 +05:30
Aditya Toshniwal 028473eb83 Fix an issue where oid column should not be pasted when copy/paste row is used on query output containing the oid column. Fixes #4381 2019-08-28 13:35:40 +05:30
Usman Muzaffar ac298b03c0 1) Add Reverse Engineered SQL tests for Views. Fixes #4576
2) Ensure View should be created with special characters. Fixes #4486
2019-08-28 12:48:59 +05:30
Aditya Toshniwal 06ad6b8ba8 1) Ensure Boolean columns should be editable using keyboard keys. Fixes #3778
2) Ensure Boolean columns should be editable in View/Edit data and Query Tool. Fixes #4487
2019-08-28 11:09:30 +05:30
Aditya Toshniwal dbbbb2e5ed Fix query tool launch error if user name contain html characters. Fixes #4674 2019-08-28 10:46:28 +05:30
Akshay Joshi 28b741a13a Fixed timezone issue in RE-SQL test cases for Roles. 2019-08-27 19:54:30 +05:30
Murtuza Zabuawala 1ddc9cc889 Modified RE-SQL test to cover Password, Account Expire, Connection Limit and Variables for Roles. 2019-08-26 18:25:48 +05:30
Aditya Toshniwal 53ab4d7e8d Fix an error that could be seen when click on any system column of a table. Fixes #4577 2019-08-26 14:36:07 +05:30
Yosry Muhammad f8f7d5ac6f Ensure editable and read-only columns in Query Tool should be identified by icons and tooltips in the column header. Fixes #4667 2019-08-26 14:17:40 +05:30
Yosry Muhammad 5887fb3815 Some refactoring of sqleditor.js. 2019-08-23 16:15:43 +01:00
Aditya Toshniwal 234efc3be7 Don't wait for the database connection before rendering the Query Tool UI, for improved UX. Fixes #4453
In addition, unescape HTML entities in database names in the Query Tool title bar. Fixes #4584
2019-08-23 12:14:20 +01:00
Dave Page 25f85fe123 Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container. Fixes #4657 2019-08-23 09:53:24 +01:00
Aditya Toshniwal 3dadb8989b Fix a debugger error when using Python 2.7. Fixes #4419
Also fixes a minor bug where a reload warning was unnecessarily given when closing the debugger.
2019-08-23 09:43:51 +01:00
Akshay Joshi 232fe286ee Fix SQL tab issue for Views. It's a regression of compound triggers. Fixes #4650 2019-08-23 10:22:20 +05:30
Dave Page 6192c48ef9 Further tweaks for formatting. 2019-08-22 15:41:24 +01:00
Dave Page 92aabb215f Improve formatting. 2019-08-22 15:34:04 +01:00
Dave Page c76b30e353 Allow configuration options to be set from the environment in the container distribution. Fixes #4651 2019-08-22 15:24:04 +01:00
Dave Page 1795141aec Minor doc styling tweaks. 2019-08-22 15:11:59 +01:00
Shubham Agarwal 9f455a514e Feature test improvement and fix intermittent failures part of #3936 2019-08-22 14:50:51 +05:30
Akshay Joshi 7090c02014 Move schema precondition logic into separate function for RE-SQL. 2019-08-21 18:12:33 +05:30
Neel Patel dc64ce331a Fix length and precision enable/disable issue when changing the data type for Domain node. Fixes #4644. 2019-08-21 16:27:23 +05:30
Akshay Joshi 094e5577e8 Add Reverse Engineered SQL tests for Rules. Fixes #4600 2019-08-21 16:06:05 +05:30
Akshay Joshi 41e2a674e3 Fix Truncate option deselect issue for compound triggers. Fixes #4643 2019-08-20 17:09:26 +05:30
Akshay Joshi bdff046c57 1) Added ProjectSet icon for explain module. Fixes #2706
2) Added Gather Merge, Named Tuple Store Scan and Table Function Scan icon for explain module. Fixes #2828
2019-08-20 16:47:53 +05:30
Akshay Joshi 5c8aefc01e Update version for release 2019-08-20 10:26:49 +05:30
Khushboo Vashi ed76787b76 Fix the Transaction Status failed test cases. 2019-08-20 10:22:11 +05:30
Akshay Joshi f3e4721a90 Added missing file for function selectivity feature. Fixes #4333 2019-08-20 10:02:43 +05:30
Akshay Joshi 0d6f07a035 1) Ensure compound triggers should be displayed under Views. Fixes #4638.
2) Ensure Truncate option should be available for Compound Triggers. Fixes #4641.
2019-08-20 09:39:31 +05:30
Akshay Joshi 624f229ce7 Comment out the failed Transaction Status API test cases for successful Jenkins build 2019-08-20 09:33:42 +05:30
Murtuza Zabuawala 3155380621 Fix issue where Deleting N number of rows makes first N number of rows disable. Fixes #3605 2019-08-19 12:12:28 +05:30
Yosry Muhammad 663e8382f3 1) Added new python test that checks the transaction status after executing queries and saving data when auto-commit is on/off.
2) Some refactoring of previously written python tests.
2019-08-19 11:45:36 +05:30
Identifier Anonymous 659d0b8436 Update Japanese translation. 2019-08-17 16:49:59 +05:30
Akshay Joshi 24f9f65b1b Ensure compound triggers for event should be updated properly. Fixes #4635 2019-08-17 15:58:50 +05:30
Akshay Joshi 177def1e58 Update message catalogs. 2019-08-16 17:55:38 +05:30
Murtuza Zabuawala 3f541200d9 Add Reverse Engineered SQL tests for Columns. Fixes #4546 2019-08-16 17:36:13 +05:30
Yosry Muhammad 687204771c Add support in query history to show internal queries generated by pgAdmin during save data operations. Fixes #4612 2019-08-16 17:17:12 +05:30
Akshay Joshi 4403f326e9 Fix PEP8 issue 2019-08-12 14:41:22 +05:30
Akshay Joshi 35bbee3023 Fix generation of reverse engineered SQL for Rules. Fixes #4586 2019-08-12 14:27:02 +05:30
Aditya Toshniwal a51de78292 Fix issue in drag drop feature. It's regression of RM #4552 2019-08-12 13:11:56 +05:30
Aditya Toshniwal a850e7bd5a Update the documentation for pgAgent to clarify Batch jobs won't run on remote servers. Fix minor css issue in docs. 2019-08-12 11:45:54 +05:30
Yosry Muhammad b618dfe286 Fix double click issue to expand the contents of a cell if the resultset was not editable. Fixes #4585 2019-08-09 11:45:05 +05:30
Aditya Toshniwal 99b51f8f20 Remove HardSourceWebpackPlugin as WebPack 4 is fast enough and it causes more problems than it solves. 2019-08-08 15:38:47 +01:00
Aditya Toshniwal bfca1e3ac8 Set the Werkzeug logger to the same log level as the rest of the app. 2019-08-08 15:36:22 +01:00
Dave Page 7f667f5761 Add support for OpenSSL 1.1.1 to the Windows installer build. 2019-08-08 15:07:11 +01:00
Aditya Toshniwal 1281f5cd6c Fix console error when changing kind(SQL/BATCH) for pgAgent job step. Fixes #4582 2019-08-08 18:43:38 +05:30
Akshay Joshi 350ffcce7c 1) Add support of Compound Triggers for EPAS 12+. Fixes #4144.
2) Ensure enable trigger menu should be visible when trigger is disabled. Fixes #4578.
2019-08-08 16:59:11 +05:30
Dave Page 8331f62e1c Fix PEP-8 issue. 2019-08-08 10:09:28 +01:00
Khushboo Vashi c29275011a Ensure the comment on a Primary Key constraint can be edited under the Table node. Fixes #4581 2019-08-08 09:52:10 +01:00
Akshay Joshi 7f53e13aa7 Fix generation of reverse engineered SQL for partition table, partitions were shown as a child of indexes. Fixes #4414 2019-08-07 17:49:13 +05:30
Dave Page d1530015ee Stupid tabs 2019-08-07 11:27:39 +01:00
Fahar Abbas 228d3dde5b Improve consistency of the regression README. Fixes #4579 2019-08-07 11:24:10 +01:00
Dave Page 3a5464b278 Display the row count in the popup message when counting table rows, not just in the properties list. Fixes #4574 2019-08-07 11:17:57 +01:00
Dave Page b9d5e08e8f Make sure the package-lock.json file is removed. 2019-08-07 11:07:10 +01:00
Aditya Toshniwal 4067d65a30 Improve test messages 2019-08-07 10:17:34 +01:00
Dave Page ee2099d9c6 Further message tweak. 2019-08-06 16:43:37 +01:00
Dave Page bfb05d3f9f Improve message wording. 2019-08-06 16:40:29 +01:00
Aditya Toshniwal 9cdb3b40ab Add Reverse Engineered SQL tests for Trigger Functions. Fixes #4554
Fix the reverse engineered SQL for trigger functions with the WINDOW option selected. Fixes #4565
2019-08-06 14:26:11 +01:00
Aditya Toshniwal 6800b1f723 Add an optimisation to the internal code responsible for searching for treeview nodes. Fixes #4570
Attached is a tiny but very effective patch to improve the speed of
finding a node using path (used internally).
If you right click or just click on a node, internally the node is
traversed using its path. But currently, it compares with the path of
all the open nodes to find a match.
So if you 1000+ tables and the tables node is open and if you click on
a view, the view path is compared with all the 1000+ tables (and with
any other open nodes above) before arriving to path. You're at bad luck
if you have more open servers above.

Code is changed to check if the path of node to be found starts with the
current node path. If it doesn't match, why bother the children's of
current node.
This change will not show much effect for small data, but it does matter
for large servers.

One more change is to remove unnecessary calls to find node and use the
data available with Main Menu -> Object to enable/disable node context
menu items.
2019-08-06 14:02:57 +01:00
Aditya Toshniwal db7a2e3023 Add a --modules option to the RE-SQL test suite to allow testing of specific object types. Fixes #4560 2019-08-06 13:43:49 +01:00
Murtuza Zabuawala ee8fec6d7f Allow enhanced cookie protection to be disabled for compatibility with dynamically addressed hosting environments. Fixes #4566 2019-08-06 09:21:31 +01:00
Khushboo Vashi f8afe2ef94 Add Reverse Engineered SQL tests for Exclusion Constraint. Fixes #4555 2019-08-05 16:25:55 +05:30
Ma Yanhong efbad77dbe Update Chinese translation. 2019-08-05 08:57:34 +01:00
Aditya Toshniwal b5c8c85c90 Ensure triggers should be updated properly for EPAS server. Fixes #4559 2019-08-05 12:49:33 +05:30
Dave Page d7ee4bb932 Update library inventory. 2019-08-02 15:50:44 +01:00
Aditya Toshniwal 8780462708 Add various make targets for auditing the Python and JS modules. Update the install-node target so that it de-dupes JS modules.
Original patch by Aditya, with further work from Ashesh and I.
2019-08-02 14:05:09 +01:00
Aditya Toshniwal 99a8b70e00 Fix some errors thrown on the JS console when dragging text in the Query Tool. Fixes #4552 2019-08-02 11:28:57 +01:00
Yosry Muhammad 0cfd76c279 Fix load on demand in View/Edit data mode. Fixes #4536 2019-08-02 10:39:19 +01:00
Akshay Joshi 537c27a58e Use the full tab space for CodeMirror instances on dialogues where appropriate. Fixes #4540 2019-08-02 10:25:21 +01:00
Aditya Toshniwal aab5fadc01 Update wcDocker to allow the browser's context menu to be used except in tab strips and panel headers. Fixes #4229
Update wcDocker to prevent window state loading creating blank dialogues. Fixes #4489
2019-08-01 15:36:40 +01:00
Yosry Muhammad 97e39699ea Ensure the Query Tool doesn't throw an error when viewing the contents of a table with no columns. Fixes #4492 2019-08-01 14:39:02 +01:00
Yosry Muhammad 76e658ee12 Ensure command tags are shown in the messages tab of the Query Tool. Fixes #4520 2019-08-01 14:29:38 +01:00
Yosry Muhammad 7b65507533 Ensure the query tool will work with older versions of psycopg2 than we officially support, albeit without updateable resultsets. Fixes #4520 2019-08-01 13:59:53 +01:00
Dave Page cbe40176c1 PEP-8 fix. 2019-08-01 13:47:18 +01:00
Aditya Toshniwal bcb1392a1a Ensure type names are properly encoded in the results grid. Fixes #4401 2019-08-01 13:17:00 +01:00
Dave Page 9a8a28e4f9 Allow a banner to be displayed on the login and other related pages showing custom text. Fixes #4549 2019-08-01 11:39:40 +01:00
Akshay Joshi 1ff007d1cb Swap the Schema and Schemas icons and Catalog and Catalogs icons that had been used the wrong way around. 2019-08-01 11:39:49 +05:30
Dave Page 3cb02bcdc3 Add a warning to notify packagers of dependency updates. 2019-07-29 11:24:54 +01:00
Yosry Muhammad 82d209946f Added support for editing of result sets from tables with OIDs in query tool. 2019-07-29 12:26:53 +05:30
Akshay Joshi 2ef3080d0e Add support for generated columns in Postgres 12+. Fixes #4334
Ensure columns can be created when they are IDENTITY fields with the CYCLE option enabled. Fixes #4496
Ensure purely numeric comments can be saved on new columns. Fixed #4497
2019-07-25 16:38:26 +01:00
Daniel Gustafsson 5b322d94e8 Fix generation of reverse engineered SQL for tables with Greenplum 5.x. Fixes #4179 2019-07-25 16:16:44 +01:00
Khushboo Vashi adb5cd34bf Add support for planner support functions in PostgreSQL 12+ functions. Fixes #4333 2019-07-25 16:09:37 +01:00
Murtuza Zabuawala 108af5c10b Fix accessibility issue for Datetime cell in backgrid. Fixes #4508 2019-07-25 17:54:24 +05:30
Ganesh Jaybhay 136bb412a1 1) Fix accessibility issue for checkbox in IE11. Fixes #4490
2) Fix adjacent switch cell focus issue in backgrid for IE.
2019-07-25 17:23:56 +05:30
Akshay Joshi 8cfe39e837 Fix syntax error in query tool feature test for Python 2.7 2019-07-25 11:26:45 +05:30
Dave Page ec968dbc14 Remove duplicated blank message entry which is illegal. 2019-07-24 15:17:59 +01:00
Akshay Joshi b4d9fea83d Update version for release 2019-07-23 10:40:51 +05:30
Khushboo Vashi c019778a47 1) Fix an error while retrieving json data from the table. Fixes #4427
2) Fix an issue where Explain and Explain Analyze are not working, it's regression of #1760. Fixes #4484
3) Fix an issue where Filter toolbar button is not working in view/edit data, it's regression of keyboard navigation. Fixes #4485
2019-07-22 18:42:48 +05:30
Fred Escallier 6e49c9c36f Update French translation 2019-07-22 17:05:27 +05:30
Nagesh Dhope 1813eca1ca Add support for pre-condition SQL in RE-SQL testsuite,
and use it to ensure that the right extensions are installed for the
extension tests.
2019-07-22 09:44:17 +01:00
Identifier Anonymous 4a6991d0df Update Japanese translation 2019-07-22 11:06:58 +05:30
Akshay Joshi 003ab44a91 Update message catalogs. 2019-07-19 17:46:45 +05:30
Akshay Joshi 5a0aae0c1c Correct the issue number and sequence in release note. 2019-07-18 12:41:54 +05:30
Yosry Muhammad f5b927b925 Randomise table names for tests. 2019-07-17 16:50:59 +01:00
Akshay Joshi d78dfbd30f Ensure Selenium is started only when it's needed. 2019-07-17 15:38:14 +01:00
Khushboo Vashi 8168f623c4 Add Reverse Engineered SQL tests for Constraints. Fixes #4475 2019-07-17 13:25:08 +01:00
Yosry Muhammad 710d520631 Add support for editing of resultsets in the Query Tool, if the data can be identified as updatable. Fixes #1760
When a query is run in the Query Tool, check if the source of the columns
can be identified as being from a single table, and that we have all
columns that make up the primary key. If so, consider the resultset to
be editable and allow the user to edit data and add/remove rows in the
grid. Changes to data are saved using SAVEPOINTs as part of any
transaction that's in progress, and rolled back if there are integrity
violations, without otherwise affecting the ongoing transaction.

Implemented by Yosry Muhammad as a Google Summer of Code project.
2019-07-17 11:45:20 +01:00
Dave Page beb06a4c76 Fix typo 2019-07-16 14:36:29 +01:00
Dave Page aed6b9e636 Improve error output for the RE-SQL tests. 2019-07-16 09:35:00 +01:00
Dave Page 2c2c738f31 Cleanup wording. 2019-07-15 16:02:19 +01:00
Akshay Joshi ab87035658 pgAgent fixes:
"malformed array literal error when updating pgagent job". Fixes #4428
"Error when updating connection string in pgagent Jobs.". Fixes #4448
When user create a schedule using Create->Schedule dialog browser tree is not showing newly created node.
Properties tab showing same properties for all the created schedule.
Added validation in "pga_jobstep.js", throws error on browser when we modify step from the pgagent dialog and select the same node.
2019-07-15 15:54:57 +01:00
Aditya Toshniwal d3ef1137d9 Add Reverse Engineered SQL tests for Sequences. Fixes #4469 2019-07-15 14:56:22 +01:00
Aditya Toshniwal 0b82a4ad92 Fix sequence reverse engineered SQL generation with quoted names on PG/EPAS 10+. Fixes #4470 2019-07-15 14:55:07 +01:00
Murtuza Zabuawala f4453e33cc Stabilise ordering of ACLs in Type RE-SQL tests to prevent random failures. 2019-07-15 14:48:22 +01:00
Shubham Agarwal 809e0682bd Add Reverse Engineered SQL tests for FTS Parsers. Fixes #4471 2019-07-15 12:02:44 +01:00
Murtuza Zabuawala 1831c9e70a Use ROLE consistently when generating RE-SQL for roles, not USER. Fixes #4446 2019-07-15 11:31:27 +01:00
Murtuza Zabuawala 1dcf46cc5f Add Reverse Engineered SQL tests for Types. Fixes #4468 2019-07-15 10:25:04 +01:00
Neel Patel 88ab6db976 Add Reverse Engineered SQL tests for Domains. Fixes #4463 2019-07-12 14:39:49 +01:00
Khushboo Vashi 79e6f4c008 Add Reverse Engineered SQL tests for Collations. Fixes #4464
This also adds the ability to test the msql output in ALTER steps.
2019-07-12 14:37:00 +01:00
Dave Page 6b5ca07715 Fix external utility tests to run on Windows 2019-07-12 13:55:18 +01:00
Dave Page 3f4d5a687b Rename horribly named function. 2019-07-12 13:00:23 +01:00
Navnath Gadakh ce8a2bb266 Fix re-sql tests for packages on EPAS 9.4-9.6. 2019-07-12 11:32:29 +01:00
Dave Page 3dd1e8e102 Fix wording. 2019-07-12 11:17:35 +01:00
Akshay Joshi 29fd83dc6c Fix dropping of pgAgent schedules through the Job properties. Fixes #3996 2019-07-12 10:37:41 +01:00
Akshay Joshi ed01274f7b Fix an error that could be seen when editing column privileges. Fixes #4389 2019-07-12 10:16:18 +01:00
Murtuza Zabuawala 20a5899c7d Fix some minor UI issues on IE11. Fixes #4462
Includes some Jasmine test case fixes from Ganesh.
2019-07-12 10:06:30 +01:00
Dave Page 1df26cb731 Make the RE-SQL test output a little more consistent with other tests. 2019-07-11 14:12:41 +01:00
Nagesh Dhope 379b92729a Add Reverse Engineered SQL tests for FTS Dictionaries. Fixes #4460 2019-07-11 14:00:11 +01:00
Ganesh Jaybhay 4cbc1f2f59 Allow keyboard navigation of all controls on subnode grids. Partially fixes #3919 2019-07-11 10:14:01 +01:00
Navnath Gadakh 28585110dd Add Reverse Engineered SQL tests for Packages. Fixes #4456 2019-07-11 09:23:13 +01:00
Akshay Joshi cdf655f7db Add Reverse Engineered SQL tests for Languages. Fixes #4452 2019-07-11 09:20:01 +01:00
Nagesh Dhope e6c067025c Fixed resql test cases for Extensions specific to database servers. 2019-07-11 13:16:00 +05:30
Akshay Joshi 6c7e95a463 Added re_sql test cases for privileges in Foreign Data Wrappers 2019-07-10 17:57:11 +05:30
Dave Page 49503dc73d Add documentation on using Traefik with pgAdmin mounted under a subdirectory, and tidy up the reverse proxying docs a little. 2019-07-10 12:03:37 +01:00
Ganesh Jaybhay f7d6966d60 Add Reverse Engineered SQL tests for FTS Configurations. Fixes #4454 2019-07-09 17:02:55 +01:00
Dave Page bf0d53bc2c Add an example Traefik configuration. 2019-07-09 14:14:46 +01:00
Dave Page 2a56e47c5c Fix typo 2019-07-09 14:11:38 +01:00
Nagesh Dhope 84b712a008 Add RE-SQL tests for Extensions. Fixes #4453 2019-07-09 13:23:26 +01:00
Akshay Joshi f085460453 Remove some files which was committed by mistake. 2019-07-09 16:47:23 +05:30
Akshay Joshi 1a9d8f01aa 1) Ensure re_sql tests should not abort at the first failure, it should run all the test cases.
2) Added place holder for owner, so we won't need to create separate pg/ppas folder just because of change in the owner name.
2019-07-09 15:37:53 +05:30
Khushboo Vashi f4ac1e804e Modified the creation logic of custom schema and added support for schema id in re_sql test framework. 2019-07-09 13:09:32 +05:30
Akshay Joshi a17687e27c Fix reverse engineered sql for Foreign Data Wrapper created on EPAS server in redwood mode. Fixes #4450 2019-07-09 12:21:13 +05:30
Dave Page 08e6d54184 Add an example of reverse proxying from HTTPS to HTTP using Nginx. 2019-07-08 17:12:31 +01:00
Dave Page 07089785be Add examples of reverse proxying with nginx. 2019-07-08 16:38:11 +01:00
Akshay Joshi 8c39b10d9c Ensure browser should not be started by Selenium when feature tests are excluded from a test run. Fixes #4442 2019-07-08 17:38:06 +05:30
Dave Page bd0e4a5a8f Remove some files committed in error. 2019-07-08 12:07:50 +01:00
Dave Page 863f62f4d8 Use special characters in names for RE-SQL tests to exercise quoting. 2019-07-08 11:03:30 +01:00
Khushboo Vashi 7c38c1cb38 Fix small issue which is required to support the custom schema in re_sql test cases. 2019-07-08 12:33:31 +05:30
Akshay Joshi 11a3aa56be Use different folders for pg vs. ppas RE-SQL tests. Fall back to the tests folder without a subdirectory if neither exist. 2019-07-05 14:40:51 +01:00
Dave Page e4bf52f355 Don't distinguish between issue types in their URL text. 2019-07-05 11:38:12 +01:00
Aditya Toshniwal ba32c98241 Add Reverse Engineered SQL tests for FDWs. Fixes #4441 2019-07-05 11:24:54 +01:00
Khushboo Vashi 954c0d3101 Added logic to provide custom schema name in re_sql test framework. 2019-07-05 15:35:33 +05:30
Dave Page 6a2ba22f75 Fxi a couple of colors in the doc theme per Aditya. 2019-07-05 09:32:19 +01:00
Akshay Joshi 776884860e Ensure parameter values are quoted when needed when editing roles. Fixes #4393 2019-07-04 15:00:29 +01:00
Aditya Toshniwal 0aa18fd466 Ensure drag/drop from the treeview works as expected on Firefox. Fixes #4429 2019-07-04 14:49:09 +01:00
Aditya Toshniwal 15427334af Set the mouse cursor appropriately based on the layout lock state. Fixes #4318 2019-07-04 14:33:05 +01:00
Dave Page 3487b3360e Use our own doc theme. 2019-07-04 14:10:01 +01:00
Akshay Joshi fabb644230 Update the version number in release note. 2019-07-04 18:09:31 +05:30
Akshay Joshi bf1f9a4b07 Fix table icon issue when updating any existing field. Fixes #4437 2019-07-04 17:34:47 +05:30
Murtuza Zabuawala 588e3814d1 Add RE-SQL tests for Roles and Resource Groups. Fixes #4415 2019-07-03 14:38:29 +01:00
Aditya Toshniwal f4bc4475cd Add more comprehensive feature tests for the data grid editor. 2019-07-03 14:30:12 +01:00
Aditya Toshniwal 0340b8fb28 Add EXPLAIN options for SETTINGS and SUMMARY. Fixes #4335
Prevent flickering of large tooltips on the Graphical EXPLAIN canvas. Fixes #4224
EXPLAIN options should be Query Tool instance-specific. Fixes #4395
2019-07-03 13:57:56 +01:00
Aditya Toshniwal 15556f9f89 Correct the condition to compare version for Windows installer. Regression of last commit. 2019-07-02 20:12:00 +05:30
Aditya Toshniwal b76e0bea83 Ensure the version comparision should be correct for windows installer. Fixes #4421 2019-07-02 14:58:18 +05:30
Akshay Joshi 252429df50 Update version for release 2019-06-28 09:40:31 -04:00
Akshay Joshi d6c6b4a15a update the release date and message catalogs 2019-06-28 09:38:20 -04:00
Dave Page 64d31b9d3f Fix a quoting issue that caused a blank UI to be displayed when running in French. Fixes #4407 2019-06-28 08:54:58 -04:00
Aditya Toshniwal 24ec882f45 Properly escape dragged node text. Fixes #4139 2019-06-28 08:17:04 -04:00
Andrew Coleman d397959f6a Allow the path to /pgadmin4/servers.json to be overridden in the container distribution. Fixes #4400 2019-06-27 10:56:37 -04:00
Aditya Toshniwal da8cf14047 Prevent an error that may occur when editing data with an integer primary key. Fixes #4404 2019-06-27 10:43:25 -04:00
Aditya Toshniwal 2451db8797 Ensure the browser close confirmation is only shown when closing a Query Tool which is running in a separate browser tab. Fixes #4403 2019-06-27 10:37:50 -04:00
Aditya Toshniwal 173b812b93 Allow some objects to be dragged/dropped into the Query Tool to insert their signature into the query text. Fixes #4139 2019-06-27 10:30:05 -04:00
Usman Muzaffar bdb8f20aed Feature test fixes:
The query tool element while running on jenkins, is present on the DOM but not visible due to comparatively small page size. So handle it , would work in both cases(if element is visible or not).
The tab name handles XSS characters due to which table name <h1> is shown modified accordingly in the tab name.
2019-06-27 10:19:57 -04:00
Aditya Toshniwal 0d42f8026c Fix SSH tunnel password decryption. Fixes #4320 2019-06-25 07:06:04 -04:00
Ma Yanhong c69ffaa91c Update Chinese translation. 2019-06-25 07:03:45 -04:00
Akshay Joshi 173acd46a5 Update version for release 2019-06-25 01:44:21 +05:30
Aditya Toshniwal c39d257bf6 Fix an XSS issue when username contains XSS vulnerable text. Fixes #4386 2019-06-24 16:06:03 +05:30
Identifier Anonymous b3490ba3de Update Japanese translation 2019-06-24 05:52:53 +05:30
Fred Escallier 4e5d8fe8e2 Update French translation 2019-06-21 16:46:13 +05:30
Akshay Joshi c4de5474a4 Update message catalogs 2019-06-21 15:59:14 +05:30
Aditya Toshniwal ebb5e3fe65 Ensure Python escaping matched JS escaping and fix a minor XSS issue in the Query Tool that required superuser access to trigger. Fixes #4378 2019-06-21 09:53:57 +01:00
Dave Page 644624eabe PEP-8 fixes. 2019-06-20 14:30:31 +01:00
Dave Page 9dbb74367d Fix regression tests. 2019-06-20 14:02:15 +01:00
Khushboo Vashi c07e52b9de Ensure that both columns and partitions can be edited at the same time in the table dialog. Fixes #4380 2019-06-20 13:37:36 +01:00
Aditya Toshniwal 78d55c7cc0 Fix regression tests. 2019-06-20 13:26:06 +01:00
Dave Page 81752bb998 Remove additional "SETOF" included when generating CREATE scripts for trigger functions. Fixes #4362 2019-06-20 13:18:30 +01:00
Dave Page fb4afce629 Fix formatting change which inadvertently broke the feature tests. 2019-06-20 12:43:07 +01:00
Aditya Toshniwal 6e8ebbd375 Allow editing of data where a primary key column includes a % sign in the value. Fixes #4036
Fix an XSS issue seen in View/Edit data mode if a column name includes HTML. Fixes #4367
2019-06-20 12:21:37 +01:00
Akshay Joshi 5c0ea0c012 Capitalize the word 'export' used in Import/Export module. Fixes #4345 2019-06-19 16:17:29 +05:30
Aditya Toshniwal ce7679c4bd Added missing __init__.py file in debugger utils which is required for Python 2.7 2019-06-19 13:31:48 +05:30
Akshay Joshi b36d5d153b Ensure the debugger control buttons are only enabled once initialisation is complete. Fixes #4360 2019-06-18 14:46:28 +01:00
Akshay Joshi 9e65c971a3 Add a framework for testing reversed engineered SQL and CRUD API endpoints. Fixes #4202 2019-06-18 14:28:25 +01:00
Dave Page 71919a4ce9 Prevent the "Please login to access this page" message displaying multiple times. Fixes #4306 2019-06-17 14:12:36 +01:00
Aditya Toshniwal 402dfd07db Change icons for table inheritance (icons by Chethana Kumar) Fixes #3174
Along with this, I have also fixed few other issues/icons found on the way:
1) Dependencies tab for inherited tables/foreign keys shows partial text (Fixes ##3994).
2) Dependencies tab for child partition table shows parent partition table as Function.
3) Dependencies tab for triggers shows trigger functions as plain functions.
4) Dependents tab for partitioned table shows the child partition tables as normal table instead for partitioned tables.
2019-06-17 10:36:30 +01:00
Akshay Joshi bf548dda3f Fix help links for backup globals and backup server. Fixes #4365 2019-06-17 13:27:21 +05:30
Aditya Toshniwal 2894c6cd14 Add minor change missed in previous commit. Fixes #4329 2019-06-14 12:46:48 +01:00
Aditya Toshniwal 3b69f92d70 Ensure strings are properly encoded in the Query History. Fixes #4349 2019-06-14 09:17:02 +01:00
Aditya Toshniwal 82bd94e696 Fix connection restoration issue when pgAdmin server is restarted and the page is refreshed. Fixes #4357 2019-06-14 11:50:01 +05:30
Akshay Joshi 04328b76ba Fix syntax error for Default value of column. It is a regression of #4253 2019-06-13 18:04:43 +05:30
Murtuza Zabuawala 08b78fb6a1 Ensure we include the CSRF token when uploading files. Fixes #4350 2019-06-12 13:52:18 +01:00
Aditya Toshniwal 23364464c2 Ensure the correct label is used in panel headers when viewing filtered rows. Fixes #4228 2019-06-11 15:11:23 +01:00
Akshay Joshi d774a0ff67 Fix issue where property dialog of column should open properly for EPAS v12. Fixes #4343 2019-06-11 17:48:01 +05:30
Aditya Toshniwal 5437a8adab Fix an initialisation error when two functions with parameters are debugged in parallel. Fixes #4329 2019-06-10 14:58:07 +01:00
Dave Page 6d52f2b911 Initial support for PostgreSQL 12. Fixes #4283. Fixes #4288. Fixes #4290. 2019-06-10 14:24:45 +01:00
Dave Page 2ca11c84e8 Ensure that the Return key can be used to submit the Master Password dialogue. Fixes #4310
Ensure that browser auto-fill doesn't cause Help pages to be opened unexpectedly. Fixes #4317
2019-06-10 14:03:56 +01:00
Aditya Toshniwal f561c0cee6 Fix keyboard navigation in "inner" tabsets such as the Query Tool and Debugger. Fixes #4195 2019-06-10 11:10:49 +01:00
Fred Escallier 321b445a7e Update French translation. 2019-06-10 10:08:27 +01:00
Aditya Toshniwal 7ff85903e4 Fix issue where reverse engineered SQL was failing for foreign tables, if it had = in the options. Fixes #4171 2019-06-10 12:15:12 +05:30
Aditya Toshniwal 8b9c50ee5c Fix issue where new column should be created with Default value. Fixes #4235 2019-06-10 11:53:16 +05:30
Ma Yanhong 4b6e9b031c Update Chinese translation. 2019-06-06 10:06:28 +01:00
Dave Page e691885881 Clarify warnings about disabling the master password. 2019-06-05 15:32:47 +01:00
Dave Page caf181d5e3 Clarify docs around configuration files and disabling the master password. 2019-06-05 15:20:38 +01:00
Aditya Toshniwal d90136d93d Prevent the geometry viewer grabbing key presses when not in focus under Firefox, IE and Edge. Fixes #4255 2019-06-05 12:00:09 +01:00
Aditya Toshniwal 9a00a8a60b Update codemirror version. Fixes #4035 2019-06-05 12:12:56 +05:30
Aditya Toshniwal a588c2994d 1) Fix issue where SSH tunnel connection using password is failing, it's regression of Master Password. Fixes #4320
2) Fix some more issues related to SSH Tunnel(By: Akshay Joshi)
2019-06-05 12:07:24 +05:30
Dave Page 13704a4f34 Disable upgrade checks whilst testing. 2019-06-03 11:35:59 -04:00
Usman Muzaffar 912db8913f Ensure that successful maintenance tasks don't leave a notifier window behind when running regression tests. 2019-06-03 11:33:32 -04:00
Akshay Joshi 969a2961fe Update version for release. 2019-06-01 14:19:28 +05:30
Akshay Joshi 6b80523872 Update message catalogs. 2019-06-01 14:14:04 +05:30
Akshay Joshi c16c593322 Update the release date in the release note. 2019-06-01 14:11:34 +05:30
Akshay Joshi 6a7339bbe4 Fix syntax error while opening properties tab of functions and procedures inside packages. 2019-06-01 14:02:33 +05:30
Dave Page 41a20e0252 Fix PEP-8 issue. 2019-05-31 12:12:04 -04:00
Dave Page 2dd075161d Allow the UI layout to be fully locked or to prevent docking changes. Fixes #2653 2019-05-31 11:51:30 -04:00
Aditya Toshniwal 91075cc3f5 Disable the master password in test mode (for now). 2019-05-31 10:19:04 -04:00
Akshay Joshi 26c7d76d4f Fix the issue of accessing the SQL for Views and Materialized Views. Regression of pluralisation of folder names. Fixes #4308 2019-05-31 11:02:37 +05:30
Aditya Toshniwal 2185ea302d Omit the geometry viewer in the Query Tool from layout saving. Fixes #4169 2019-05-30 15:15:37 -04:00
Murtuza Zabuawala 32defc91cc Improve the performance of explain plan by embedding the images only when downloading it. Fixes #4307 2019-05-30 17:49:43 +05:30
Dave Page 37bde4aaf4 Credit reporter who provided test script. 2019-05-29 16:34:04 -04:00
Dave Page 1f76d207f2 Minor phrasing fix. 2019-05-29 16:32:35 -04:00
Dave Page 8eab534c95 Fix typo 2019-05-29 16:27:56 -04:00
Dave Page 0eb3008426 Tidy up keyboard shortcut docs. 2019-05-29 16:24:29 -04:00
Aditya Toshniwal dd187b9122 Prevent Alertify from inadvertently opening help pages. 2019-05-29 13:46:39 -04:00
Aditya Toshniwal 15252b0a26 Added Help button on all master password dialogs. 2019-05-29 13:07:50 +05:30
Akshay Joshi aa95ff9f57 Fix encoding issue for background process, it is regression of Master Password. Fixes #4303 2019-05-29 12:50:48 +05:30
Fred Escallier dad0d690db Update French translation. 2019-05-29 12:25:37 +05:30
Dave Page 2fa849dc26 Also need openssl-dev 2019-05-28 18:11:42 -04:00
Dave Page f340cd044b build-deps doesn't exist any more. 2019-05-28 18:09:06 -04:00
Dave Page 991f667f9f Argh, they are Alpine packages, not Python. 2019-05-28 18:01:56 -04:00
Dave Page 307637b969 Looks like we also need build tools for the cryptography module. 2019-05-28 17:56:54 -04:00
Dave Page 91595593d3 Doc builds now need the cryptography module. 2019-05-28 17:50:11 -04:00
Identifier Anonymous 12186a0fd6 Update Japanese translation. 2019-05-28 17:11:27 +05:30
Ashesh Vashi 9fdf68d559 Fix fatal error on launch of pgAdmin4. Fixes #4298 2019-05-28 17:05:54 +05:30
Akshay Joshi 8851cb0704 Update version for release 2019-05-28 12:09:33 +05:30
Akshay Joshi a936f708de Update message catalogs. 2019-05-28 12:06:44 +05:30
Aditya Toshniwal dfa892d2a2 1. Added Master Password to increase the security of saved passwords. Fixes #4184
2. In server(web) mode, update all the saved server credentials when user password is changed. Fixes #3377
2019-05-28 12:00:18 +05:30
Khushboo Vashi 6f0eafb223 Fixed CSRF security vulnerability issue. per Alvin Lindstam. Fixes #4217
Initial patch by: Khushboo Vashi
Modified by: Ashesh Vashi and Murtuza Zabuawala
2019-05-28 10:59:51 +05:30
Akshay Joshi 90a45557b9 1. Fix syntax error when adding more than one column to the existing table. Fixes #4162
2. Fix syntax error when creating a table with a serial column. Fixes #4284
2019-05-27 13:09:11 +05:30
Akshay Joshi 2790d01c31 Update message catalogs. 2019-05-24 17:26:26 +05:30
Dave Page 4d23bb24a5 Add a missing fix. 2019-05-24 09:36:33 +01:00
Aditya Toshniwal 361f7077fd Update the UI logo. Artwork by Chethana Kumar. Fixes #4208 2019-05-23 16:39:10 +01:00
Usman Muzaffar dcd163ac02 Feature test stabilisation. 2019-05-23 09:31:52 +01:00
Aditya Toshniwal ee37be56f9 Fix handling of JSON in the Query Tool with NULL elements. Fixes #4263 2019-05-23 08:53:29 +01:00
Dave Page f1ef7b0346 Validate permissions on the session directory itself, not it's parent, per Felix Pusch. Fixes #4276 2019-05-21 12:14:36 +01:00
Dave Page 0ee50ac248 Clarify wording for the NO INHERIT option on constraints, per Michel Feinstein. Fixes #4275 2019-05-21 11:51:19 +01:00
Dave Page ea4dbd31e8 Don't try to set permissions on Windows. It won't work anyway. Fixes #4276 2019-05-20 13:53:08 +01:00
Murtuza Zabuawala 155768a2d7 Prevent Backgrid Password cells from losing focus if the browser opens an autocomplete list. Fixes #4278 2019-05-20 13:34:47 +01:00
Dave Page da8da7bb49 Relax the permission check on the directory containing the config database, as it may fail in some environments such as OpenShift. Fixes #4276 2019-05-20 09:46:02 +01:00
Murtuza Zabuawala 5786c17569 Fix navigation of switch cells in grids. Fixes #4269 2019-05-17 16:27:14 +01:00
Dave Page 941dea99f5 Fix typo. 2019-05-17 09:04:04 +01:00
Sander Eikelenboom ab5f35da8d Fixed error on displaying table properties of a table partitioned by list having a default partition. Fixes #4262 2019-05-15 18:36:16 +05:30
Aditya Toshniwal db4bb22cc6 Ensure that element should get highlighted when they get focus on using Tab key. Fixes #4245 2019-05-15 17:42:07 +05:30
Aditya Toshniwal 2cd58efcdd 1) Fixed Tab key navigation for Maintenance dialog. Fixes #4227
2) Fix Tab key issue for Toggle switch controls and button on the dialog footer in Safari browser. Fixes #4244
2019-05-15 16:37:06 +05:30
Aditya Toshniwal ed8d1cde00 Fix accessibility issue for menu navigation. Fixes #4194 2019-05-15 15:38:33 +05:30
Akshay Joshi b7121bb2d2 1) Make folder name pluralise inside 'templates' folder and fix naming inconsistency.
2) Remove unwanted functions "module_js()" from the code.
3) Change naming convention for 'Roles' module.
2019-05-15 15:11:54 +05:30
Dave Page 3364350b01 Fix the check target. 2019-05-15 10:03:29 +01:00
Dave Page 4b421550d3 Stop using application/x-javascript as a mime type and use the RFC-compliant application/javascript instead. Fixes #4261 2019-05-15 09:44:57 +01:00
Dave Page 020d9bb018 Clarify when the container will load server definitions. 2019-05-14 09:27:47 +01:00
Murtuza Zabuawala eb189844e7 Fixed console error when subnode control is used in panels. Fixes #4246 2019-05-10 11:24:15 +05:30
Akshay Joshi 20c42d878b Updated jQuery version as they have fixed some vulnerability issue. 2019-05-03 16:47:35 +05:30
Aditya Toshniwal 036bd66638 Fix file browser path issue which occurs when client is on Windows and server is on Mac/Linux. Fixes #4164 2019-05-03 11:58:06 +05:30
Dave Page f02f91cbf1 Ensure popper.js is installed when needed. Fixes #4219 2019-04-30 13:57:10 +01:00
Neel Patel 34b59da526 Properly assign dropdownParent in Select2 controls. Fixes #4218 2019-04-30 12:57:17 +01:00
Fred Escallier 277bf85645 Update French translation. 2019-04-30 11:47:17 +05:30
Akshay Joshi 991fe3d797 Update version for release. 2019-04-30 10:49:49 +05:30
Identifier Anonymous 4009ac3108 Update Japanese translation 2019-04-29 09:21:55 +01:00
Akshay Joshi 92e6a47713 Update message catalogs. 2019-04-26 17:39:45 +05:30
Dave Page e53c2b1a5d Ensure the treeview shows all sequences except those used to implement IDENTITY columns (which can be edited as part of the column). Show all if Show System Objects is enabled. Fixes #4154 2019-04-26 12:36:56 +01:00
Dave Page e536408ce2 Don't try to install Chromedriver using the chromedriver_installer module as it no longer works and doesn't seem to be supported. 2019-04-25 09:41:40 +01:00
Dave Page f74448a1b2 Add a script for installing the required Chromedriver version. 2019-04-25 09:38:52 +01:00
Akshay Joshi 9b5a6e2bb7 Prevent duplicate columns being included in reverse engineered SQL for tables. Fixes #4163 2019-04-24 11:35:20 +01:00
Aditya Toshniwal 3fef078ec8 Remove some unecessary React libraries. 2019-04-24 09:29:01 +01:00
Khushboo Vashi 74af8976c9 Ensure that newly added row in backgrid should be visible. 2019-04-23 17:32:00 +05:30
Khushboo Vashi ecded18333 Fix an issue where 'GRANT UPDATE' sql should be displayed for default sequence privileges. Fixes #4087 2019-04-22 12:24:47 +05:30
Khushboo Vashi 5452bff49e Fixed 'Increment value cannot be empty' error for existing tables. Fixes #4160 2019-04-22 12:04:49 +05:30
Aditya Toshniwal 05ae330030 Improvement for 'beforeunload' event, bind the event only from where it is required. 2019-04-22 11:30:33 +05:30
Dave Page 94e1820ccd Fix skip on Windows. 2019-04-18 11:18:06 +01:00
Aditya Toshniwal 49b318c39e Ensure that confirmation dialog should be popped up before reload of query tool or debugger
if it is opened in a new browser tab. Fixes #4101
2019-04-18 15:39:36 +05:30
Dave Page 4ac064de42 Urgh. Typo. 2019-04-18 09:13:55 +01:00
Dave Page 2ef71cf749 Skip the permissions test on Windows which doesn't support Unix style file permissions. 2019-04-18 09:13:00 +01:00
Aditya Toshniwal d96f453e7f Fixed 'Location cannot be empty' error when open Tablespace properties. Fixes #4134 2019-04-18 12:31:35 +05:30
Khushboo Vashi 0b47d1dbf6 1) Fix an issue where Deleting N number of rows makes first N number of rows disable. Fixes #3605
2) Ensure that on clicking Delete button should not delete rows immediately from the database server,
   it should be deleted when Save button will be clicked. Fixes #2392
2019-04-18 12:09:35 +05:30
Dave Page d728ee7436 Ensure sanity of the permissions on the storage and session directories and the config database. Fixes #4182 2019-04-17 16:57:34 +01:00
Dave Page 1a192109d6 Ensure we create a DMG file that's compatible with macOS 10.10+ 2019-04-15 12:12:46 +01:00
Aditya Toshniwal 024cfd2fab 1) Ensure that JSON strings as comments should be added properly for all the objects. Fixes #3582
2) Fixed alignment issue of columns in definition section of Index node. Fixes #4121
2019-04-12 15:07:07 +05:30
Murtuza Zabuawala a25bb2b7db Add tests for the CSV download. 2019-04-11 17:15:01 +01:00
Fred Escallier fd3337024f Update French translation. 2019-04-11 13:51:40 +01:00
Dave Page ded446fe8a Depend on psycopg2-binary in the Python wheel, rather than psycopg2. Fixes #4165 2019-04-11 10:08:44 +01:00
Khushboo Vashi a9d964b5ca 1) Added support for Default Partition. Fixes #3938
2) Ensure that record should be add/edited for root partition table with primary keys. Fixes #4104
2019-04-11 13:25:24 +05:30
Akshay Joshi 9c3925e448 Ensure that parameters of procedures for EPAS server 10 and below should be set/reset properly. Fixes #4161 2019-04-10 13:22:52 +05:30
Murtuza Zabuawala 6016a5ee98 Fix an issue where the dropdown becomes misaligned/displaced. Fixes #4138 2019-04-09 12:09:25 +05:30
Akshay Joshi 490999f528 Updated release notes 2019-04-08 18:33:20 +05:30
Akshay Joshi ceb0e39e14 Update version for release 2019-04-08 18:31:51 +05:30
Akshay Joshi 3bed332439 Update message catalogs. 2019-04-08 18:24:36 +05:30
Khushboo Vashi c21ea3c342 Ensure that pgAdmin4 should work properly with psycopg2 v2.8. Fixes #4143 2019-04-08 17:49:50 +05:30
Murtuza Zabuawala 84ecffa4d9 Added recommended ESLinter checks. Fixes #4142 2019-04-05 13:07:43 +05:30
Akshay Joshi 9bff6c7157 Fixed pep8 issue 2019-04-05 12:53:50 +05:30
Usman Muzaffar 5c4c09f237 Fixed feature test issues 2019-04-05 12:25:03 +05:30
Dave Page f706f7ed0c Relabel the Save button on the datagrid text editor to avoid confusion with the actual Save button that updates the database. Fixes #4131 2019-04-02 17:20:43 +01:00
Identifier Anonymous fb12b2e2fc Updated Japanese tanslation. 2019-04-02 14:41:05 +01:00
Fred Escallier badbbade08 Updated French tanslation. 2019-04-02 14:38:47 +01:00
Dave Page 614c66940a Add missing files. 2019-04-01 11:04:44 +01:00
Akshay Joshi 7f23f729c6 Update version for release. 2019-04-01 15:19:25 +05:30
Akshay Joshi a019e2de6f Update message catalogs. 2019-04-01 15:14:53 +05:30
Akshay Joshi d286bada5c Fix custom autovacuum configuration for Materialized Views. Fixes #4110 2019-04-01 09:47:17 +01:00
Akshay Joshi fe6e5e3c45 Correct the feature number in the release note. 2019-04-01 12:18:45 +05:30
Akshay Joshi 61ff588c09 Fixed issue while fetching the view id for view/materialized view. Added schema name in where clause. 2019-03-30 13:20:31 +05:30
Usman Muzaffar a2aabf6270 Remove unnecessary print statement in the regression tests. 2019-03-29 14:47:22 +00:00
Aditya Toshniwal 55c6f5205d Add some SQL updates to handle inherited column markers/comments that were missed in the previous commit. 2019-03-29 14:44:21 +00:00
Khushboo Vashi 5965bc9107 Remove a debug statement. 2019-03-29 14:40:36 +00:00
Dave Page be313bb17b Missed a bug :-( 2019-03-29 14:35:43 +00:00
Aditya Toshniwal 7627e9c699 Display errors during CSV download from the Query Tool in the UI rather than putting them in the CSV file. Fixes #4085
Ensure the toolbar buttons are properly reset following a CSV download in the Query Tool. Fixes #4096
2019-03-29 14:31:33 +00:00
Dave Page 4d45a3cb24 PEP-8 fixes. 2019-03-28 14:20:52 -04:00
Khushboo Vashi 97919d091a Add support for IDENTITY columns. Fixes #4030 2019-03-28 13:13:43 -04:00
Aditya Toshniwal 8aaacdf96e Include inherited column comments and defaults in reverse engineered table SQL. Fixes #2627
Include comment SQL for inherited columns in reverse engineered table SQL. Fixes #4037
Include inherited columns in SELECT scripts. Fixes #4058
2019-03-28 08:36:41 -04:00
Aditya Toshniwal fbc6aea497 Fix an issue where JSON data would not be rendered in the Query Tool. Fixes #4105 2019-03-28 08:12:09 -04:00
Aditya Toshniwal 6fb35f2649 Overhaul the layout saving code so it includes the Query Tool and Debugger, and stores the layout when change events are detected rather than (unreliably) on exit. Fixes #4084 2019-03-26 11:08:45 -04:00
Dave Page b917246be9 Add missing closing brace. 2019-03-26 10:25:50 -04:00
Akshay Joshi 9c2ea3ca11 1) Ensure View/Materialized View node should be visible after updating any property. Fixes #4109
2) Updated the icon for Materialized View.
2019-03-26 14:12:47 +05:30
Dave Page a5ebdafb82 Enlarge the grab handles for resizing dialogs etc. Fixes #4063 2019-03-25 07:50:55 -04:00
Dave Page c43aa9b576 Clarify Windows build requirements. 2019-03-25 07:47:47 -04:00
Akshay Joshi a0010aac31 1) Ensure that sequence should be created with Privileges.
2) Updated the validation for blank values in Definition tab.
2019-03-25 14:29:43 +05:30
Akshay Joshi c4ea1a56bc Fixed typo in logging.raiseException, it is 'raiseExceptions'. Fixes #3933 2019-03-25 11:36:18 +05:30
Akshay Joshi 212ca01506 Ensure sequences can be created with increment, start, minimum and maximum options set. Fixes #4100 2019-03-22 15:54:34 +00:00
Dave Page ce073a2856 Fix SQL help for EPAS 10+, and refactor the URL generation code into a testable function. Fixes #4099 2019-03-22 14:09:24 +00:00
Dave Page ae23f146d1 Use the user's full email address (not just the username part) as the basis for the storage directory name.. Fixes #3887 2019-03-22 09:36:13 +00:00
Dave Page 096220ece9 Fix the PEP8 yarn runner 2019-03-22 09:04:19 +00:00
Dave Page 83bb07e01d Improve the German translation for Backup Server, per H Re. Fixes #4090 2019-03-21 16:18:09 +00:00
Dave Page 89784413dd Fix indent. 2019-03-21 14:05:40 +00:00
Dave Page 17464aa034 Don't use old-style variable notation. 2019-03-21 14:02:19 +00:00
Dave Page b2b5629a01 Fix PEP-8 issues. 2019-03-21 12:58:52 +00:00
Usman Muzaffar 33693734fc Add new file missed in last commit. 2019-03-21 12:58:38 +00:00
Usman Muzaffar be26fc540c Many fixes to the stability of the feature tests, including:
tree toggle issue
Query tool inteliSence issue eg. when there is only one option and drop down is not shown
Backup and restore windows locator changes
Fixes required due to resolving rm # 4041
Dependent tab not showing data sometime, so refreshed the page and handled it
Due to change of logic for auto commit, did the required changes
Due to fix of RM 4062, did the required workaround which broke the test case.
2019-03-21 12:04:37 +00:00
Dave Page 3f22503ad2 Tidy up table formatting in the docs. Thanks to Susan Douglas for the tips! 2019-03-21 11:38:34 +00:00
Aditya Toshniwal 61f11aa4fc Update wcDocker to fix the issue where the Scratch Pad grows in size if the results panel is resized. Fixes #3968 2019-03-21 09:15:28 +00:00
Akshay Joshi 48c5c39c5d Ensure that parser should be set in FTS Configuration. 2019-03-20 20:21:58 +05:30
Aditya Toshniwal 8e9a77b3e3 Add a small utility for extracting PostgreSQL SQL and pl/pgsql keywords from the interwebs. 2019-03-20 13:53:37 +00:00
Khushboo Vashi b529c28b43 Fix an issue with Python 2.7 where regression test output is printed twice by the logger. 2019-03-20 13:37:19 +00:00
Akshay Joshi 5dd1472d6b 1) Fixed issue in Select2 Control, added undefined/null check.
2) Fixed the width of the delete cell.
2019-03-20 18:54:49 +05:30
Dave Page 906a4a845e Update pycodestyle to 2.5.0. Allow newer versions so we can catch issues early. 2019-03-20 13:01:32 +00:00
Dave Page 48c3763e95 Remove the dependency on importlib for Python <= 2.7. It's not actually required. 2019-03-20 11:58:09 +00:00
Dave Page e1ae502725 Delete the ci scripts that have be unmaintained and unused for some time now. 2019-03-20 11:27:28 +00:00
Dave Page bb1e908b54 Apply codestyle checks to all Python code. 2019-03-20 11:17:51 +00:00
Dave Page 6a8367beb9 We need to prefix the exclude directories as the pycodestyle file is now in a different location. 2019-03-20 09:33:51 +00:00
Dave Page 9273da2dc6 Fix PEP-8 issue and move the pycodestyle config into a central location. 2019-03-20 08:57:43 +00:00
Aditya Toshniwal a4bc26c810 Fix handling of numeric arrays in View/Edit Data. Fixes #4062 2019-03-19 16:45:00 +00:00
Aditya Toshniwal 3db3740cf2 Fix handling of numeric arrays in View/Edit Data. Fixes #4062 2019-03-19 16:29:05 +00:00
Khushboo Vashi 546161ab1a Fix an issue with stdout redirection on Windows, and remove code added in a failed attempt to resolve a Windows regression test issue. 2019-03-19 15:55:34 +00:00
Dave Page 4dcd3e31d8 Fix PEP-8 issue 2019-03-18 11:11:48 +00:00
Khushboo Vashi 1e26b96b12 Another attempt to satisfy Jenkins. 2019-03-18 10:33:20 +00:00
Khushboo Vashi 31e17f025b Attempt to fix the Windows regression test weirdness. 2019-03-18 09:30:08 +00:00
Dave Page 8c5894dd6a Revert "Remove the cp1252 test to see if it un-breaks the Windows buildfarm runs."
This reverts commit ce51204
2019-03-18 09:28:28 +00:00
Dave Page 04c776cbeb Randomise the database name used for encoding tests to avoid collisions when multiple tests are running against the same server. 2019-03-15 12:03:42 +00:00
Dave Page ce5120431b Remove the cp1252 test to see if it un-breaks the Windows buildfarm runs. 2019-03-15 11:01:53 +00:00
Dave Page 7a271a34c6 Make the WHEN field a CodeMirror control on the Event Trigger dialogue. Fixes #4050 2019-03-15 10:35:47 +00:00
Dave Page 2e3475e06a Fix the RE-SQL syntax for roles with a VALID UNTIL clause. Fixes #4081 2019-03-15 10:03:11 +00:00
Dave Page 4edd100ff9 Fix the clean target so that it doesn't error out if there's no runtime Makefile in the tree. 2019-03-15 09:33:42 +00:00
Dave Page b3c3b69a36 Bail out if yarn returns a non-zero code. 2019-03-15 09:20:13 +00:00
Dave Page 670a62208a Fix node paths that I broke yesterday. 2019-03-15 09:09:24 +00:00
Dave Page 69ec460b60 Fix naming inconsistency for the column and FTS parser modules. Fixes #1269 2019-03-14 16:52:42 +00:00
Dave Page 395d3cb545 Improve a couple of German translations. Fixes #3104 2019-03-14 16:36:02 +00:00
Dave Page c548eac5ef Append the file suffix to filenames when needed in the File Create dialogue. Fixes #4069 2019-03-14 15:48:21 +00:00
Dave Page 145ca618ae Remove the direct dependency on fsevents as we don't use it ourselves and it errors on Linux and Windows. 2019-03-14 15:28:46 +00:00
Khushboo Vashi e4417229aa Update all Python and JS dependencies. Fixes #4019 2019-03-14 15:11:16 +00:00
Dave Page c7b29d35ae Add an ePub doc build target (update to release notes). Fixes #4075 2019-03-13 16:23:27 +00:00
Dave Page a9dad423f6 Fix the online help button on the resource group dialogue. Fixes #4052 2019-03-13 16:21:10 +00:00
Dave Page cdc9ed678f Enable the online help button on the index dialogue. Fixes #4053 2019-03-13 16:18:51 +00:00
Dave Page 870d373ced Change the CodeMirror active line background colour to $color-danger-lighter so it doesn't conflict with the selection colour. Fixes #4073 2019-03-13 16:04:26 +00:00
Dave Page ab9a3a57ad Make the Query Tool history persistent across sessions. Fixes #4017 2019-03-13 13:37:34 +00:00
Dave Page a502019e20 Add a target for building the docs as an epub. 2019-03-12 14:33:46 +00:00
Dave Page 25b8a909b1 Update links in docs to https where possible, and fix a couple of broken/out of date ones. 2019-03-12 14:24:46 +00:00
Dave Page 2356988bdf Ensure that Firefox prompts for a filename/location when downloading query results as a CSV file. Fixes #4071 2019-03-12 12:45:25 +00:00
Khushboo Vashi eb1db50f85 Avoid 'bogus varno' message from Postgres when viewing the SQL for a table with triggers. Fixes #3995 2019-03-12 10:13:31 +00:00
Dave Page 8f1f04e5f3 Major doc cleanup:
- Reformat source so it's wrapped.
- Standardise markup.
- Center images.
- Restructure in various places to improve the indexing.
- Remove duplicated Query Tool toolbar descriptions.
- Ensure the structure works in both HTML and LaTeX.
2019-03-08 15:29:05 +00:00
Dave Page f4ca208474 Fix the latexpdf doc build. Fixes #4060
Thanks to Jean-François for the assist:
    https://groups.google.com/forum/#!topic/sphinx-users/ZlQ95_QikXo
2019-03-08 09:45:04 +00:00
Aditya Toshniwal 6aae9d6e20 Handle resultsets with zero columns correctly in the Query Tool. Fixes #4054 2019-03-07 15:22:45 +00:00
Dave Page f8b9a86e95 Include the license in the docs, and ensure it gets updated each year. 2019-03-07 15:12:12 +00:00
Dave Page 47bce4eb23 Some more doc restructuring and cleanup. 2019-03-07 14:29:51 +00:00
Dave Page 64ee23a088 Some doc restructuring and cleanup. 2019-03-07 14:26:56 +00:00
Aditya Toshniwal 4b895941b3 Remove the large and unnecessary dependency on React and 87 other related libraries. Fixes #4018 2019-03-07 10:51:59 +00:00
Dave Page d7bf6ec69f String review and subsequent cleanup
Ashesh Vashi
Abhilasha Narendra
Karen Blatchley
Susan Douglas
Dave Page
2019-03-05 14:08:16 +00:00
Fred Escallier 48c9864184 French translation update. 2019-03-05 09:55:33 +00:00
Identifier Anonymous 64a9e8cb83 Japanese translation update. 2019-03-05 09:52:58 +00:00
Dave Page f401def044 Add support for reverse proxied setups with Gunicorn, and document Gunicorn, uWSGI & NGINX configurations. Fixes #2001 2019-03-04 16:29:41 +00:00
3923 changed files with 274881 additions and 93590 deletions

No files matched your search

+12 -3
View File
@@ -1,8 +1,6 @@
*.autosave
*.db
*.diff
*.o
*.patch
*.psp
*.pyc
*.pyo
@@ -11,14 +9,18 @@
.DS_Store
.idea
.vscode
/*.diff
/*.patch
/dist
/debian-build
/docker-build
/mac-build
/pip-build
/redhat-build
/src-build
/win-build
_build
build-*
/build-*
pgadmin4.log
pkg/win32/installer.iss
pkg/mac/codesign.conf
@@ -36,10 +38,17 @@ runtime/pgAdmin4_resource.rc
runtime/release/
runtime/ui_BrowserWindow.h
web/config_local.py
web/pgadmin/misc/themes/pgadmin.themes.json
web/geckodriver.log
web/regression/test_config.json
web/regression/.coveragerc
node_modules/
web/pgAdmin/static/js/generated
web/pgadmin/static/js/generated
web/yarn-error.log
/web/cacert.pem
auditjs.html
auditpy.txt
/venv/
.scannerwork/
web/coverage/
+1 -1
View File
@@ -1,5 +1,5 @@
[pycodestyle]
ignore = E402
ignore = E402,W504,W605
max-line-length = 79
statistics = True
show-source = False
File diff suppressed because it is too large. Load diff
+200
View File
@@ -0,0 +1,200 @@
########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
#########################################################################
#########################################################################
# Create a Node container which will be used to build the JS components
# and clean up the web/ source code
#########################################################################
FROM node:12-alpine3.11 AS app-builder
RUN apk add --no-cache \
autoconf \
automake \
bash \
g++ \
libc6-compat \
libjpeg-turbo-dev \
libpng-dev \
make \
nasm \
git \
zlib-dev
# Create the /pgadmin4 directory and copy the source into it. Explicitly
# remove the node_modules directory as we'll recreate a clean version, as well
# as various other files we don't want
COPY web /pgadmin4/web
RUN rm -rf /pgadmin4/web/*.log \
/pgadmin4/web/config_*.py \
/pgadmin4/web/node_modules \
/pgadmin4/web/regression \
`find /pgadmin4/web -type d -name tests` \
`find /pgadmin4/web -type f -name .DS_Store`
WORKDIR /pgadmin4/web
# Build the JS vendor code in the app-builder, and then remove the vendor source.
RUN npm install && \
npm audit fix && \
rm -f yarn.lock && \
yarn import && \
# Commented the below line to avoid vulnerability in lodash package.
# Refer https://www.npmjs.com/advisories/1523.
# Once fixed we will uncomment it.
# yarn audit && \
rm -f package-lock.json && \
yarn run bundle && \
rm -rf node_modules \
yarn.lock \
package.json \
.[^.]* \
babel.cfg \
webpack.* \
karma.conf.js \
./pgadmin/static/js/generated/.cache
#########################################################################
# Now, create a documentation build container for the Sphinx docs
#########################################################################
FROM python:3.8-alpine3.11 as docs-builder
# Install only dependencies absolutely required for documentation building
RUN apk add --no-cache \
make \
build-base \
openssl-dev \
libffi-dev && \
pip install --no-cache-dir \
sphinx \
flask_security_too \
flask_paranoid \
python-dateutil \
flask_sqlalchemy \
flask_gravatar \
flask_migrate \
simplejson \
cryptography
# Copy the docs from the local tree. Explicitly remove any existing builds that
# may be present
COPY docs /pgadmin4/docs
COPY web /pgadmin4/web
RUN rm -rf /pgadmin4/docs/en_US/_build
# Build the docs
RUN LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C /pgadmin4/docs/en_US -f Makefile.sphinx html
#########################################################################
# Create additional builders to get all of the PostgreSQL utilities
#########################################################################
FROM postgres:9.5-alpine as pg95-builder
FROM postgres:9.6-alpine as pg96-builder
FROM postgres:10-alpine as pg10-builder
FROM postgres:11-alpine as pg11-builder
FROM postgres:12-alpine as pg12-builder
FROM alpine:3.11 as tool-builder
# Copy the PG binaries
COPY --from=pg95-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-9.5/
COPY --from=pg95-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-9.5/
COPY --from=pg95-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-9.5/
COPY --from=pg95-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-9.5/
COPY --from=pg96-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-9.6/
COPY --from=pg96-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-9.6/
COPY --from=pg96-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-9.6/
COPY --from=pg96-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-9.6/
COPY --from=pg10-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-10/
COPY --from=pg10-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-10/
COPY --from=pg10-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-10/
COPY --from=pg10-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-10/
COPY --from=pg11-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-11/
COPY --from=pg11-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-11/
COPY --from=pg11-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-11/
COPY --from=pg11-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-11/
COPY --from=pg12-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-12/
#########################################################################
# Assemble everything into the final container.
#########################################################################
FROM python:3.8-alpine3.11
COPY --from=tool-builder /usr/local/pgsql /usr/local/
WORKDIR /pgadmin4
ENV PYTHONPATH=/pgadmin4
# Copy in the code and docs
COPY --from=app-builder /pgadmin4/web /pgadmin4
COPY --from=docs-builder /pgadmin4/docs/en_US/_build/html/ /pgadmin4/docs
COPY requirements.txt /pgadmin4/requirements.txt
# License files
COPY LICENSE /pgadmin4/LICENSE
COPY DEPENDENCIES /pgadmin4/DEPENDENCIES
# Install build-dependencies, build & install C extensions and purge deps in
# one RUN step
RUN apk add --no-cache --virtual \
build-deps \
build-base \
postgresql-dev \
libffi-dev \
linux-headers && \
apk add \
postfix \
postgresql-client \
postgresql-libs \
shadow \
sudo \
libcap && \
pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir gunicorn==19.9.0 && \
apk del --no-cache build-deps && \
echo "pgadmin ALL = NOPASSWD: /usr/sbin/postfix start" > /etc/sudoers.d/postfix
# We need the v12 libpq, which is only in the 'edge' build of Alpine at present
COPY --from=pg12-builder /usr/local/lib/libpq.so.5.12 /usr/lib/
RUN ln -sf /usr/lib/libpq.so.5.12 /usr/lib/libpq.so.5
# Copy the runner script
COPY pkg/docker/run_pgadmin.py /pgadmin4
COPY pkg/docker/entrypoint.sh /entrypoint.sh
# Precompile and optimize python code to save time and space on startup
RUN python -O -m compileall -x node_modules /pgadmin4
RUN groupadd -g 5050 pgadmin && \
useradd -r -u 5050 -g pgadmin pgadmin && \
mkdir -p /var/lib/pgadmin && \
chown pgadmin:pgadmin /var/lib/pgadmin && \
mkdir -p /var/log/pgadmin && \
chown pgadmin:pgadmin /var/log/pgadmin && \
touch /pgadmin4/config_distro.py && \
chown pgadmin:pgadmin /pgadmin4/config_distro.py && \
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/python3.8
USER pgadmin
# Finish up
VOLUME /var/lib/pgadmin
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
+1 -1
View File
@@ -1,6 +1,6 @@
pgAdmin 4
Copyright (C) 2013 - 2018, The pgAdmin Development Team
Copyright (C) 2013 - 2020, The pgAdmin Development Team
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement is
+148 -154
View File
@@ -2,23 +2,26 @@
SETLOCAL
SET WD=%CD%
SET "PGBUILDPATH=%WD%\win-build"
SET "BUILDROOT=%WD%\win-build"
SET "DISTROOT=%WD%\dist"
SET CMDOPTION=""
IF "%1" == "clean" SET CMDOPTION="VALID"
IF "%1" == "x86" SET CMDOPTION="VALID"
SET CMDOPTIONS=""
IF "%1" == "clean" SET CMDOPTIONS="VALID"
IF "%1" == "" SET CMDOPTIONS="VALID"
IF NOT %CMDOPTION%=="VALID" (
IF NOT %CMDOPTIONS%=="VALID" (
GOTO USAGE
)
SET ARCHITECTURE=%1
IF "%ARCHITECTURE%"=="clean" (
IF "%1" == "clean" (
CALL :CLEAN
EXIT /B %ERRORLEVEL%
)
set "ARCHITECTURE=x64"
if "%Platform%" == "X86" (
set "ARCHITECTURE=x86"
)
REM Main build sequence
CALL :SET_ENVIRONMENT
@@ -37,7 +40,7 @@ REM Main build sequence Ends
:CLEAN
ECHO Removing build directory...
IF EXIST "%PGBUILDPATH%" RD "%PGBUILDPATH%" /S /Q > nul || EXIT /B 1
IF EXIST "%BUILDROOT%" RD "%BUILDROOT%" /S /Q > nul || EXIT /B 1
ECHO Removing temp build directory...
IF EXIST "%WD%\pkg\win32\Output" rd "%WD%\pkg\win32\Output" /S /Q > nul || EXIT /B 1
@@ -50,40 +53,32 @@ REM Main build sequence Ends
:SET_ENVIRONMENT
ECHO Configuring the environment...
IF "%PYTHON_HOME%" == "" SET "PYTHON_HOME=C:\Python27"
IF "%PYTHON_DLL%" == "" SET "PYTHON_DLL=C:\Windows\SysWOW64\python27.dll"
IF "%QTDIR%" == "" SET "QTDIR=C:\Qt\5.9.1\mingw53_32"
IF "%MAKE%" == "" SET "MAKE=mingw32-make.exe"
IF "%PGDIR%" == "" SET "PGDIR=C:\Program Files (x86)\PostgreSQL\10"
IF "%INNOTOOL%" == "" SET "INNOTOOL=C:\Program Files (x86)\Inno Setup 5"
IF "%VCREDIST%" == "" SET "VCREDIST=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\vcredist_x86.exe"
IF "%SIGNTOOL%" == "" SET "SIGNTOOL=C:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe"
IF "%PGADMIN_PYTHON_DIR%" == "" SET "PGADMIN_PYTHON_DIR=C:\Python38"
IF "%PGADMIN_QT_DIR%" == "" SET "PGADMIN_QT_DIR=C:\Qt\5.14.2\msvc2017_64"
IF "%PGADMIN_POSTGRES_DIR%" == "" SET "PGADMIN_POSTGRES_DIR=C:\Program Files (x86)\PostgreSQL\12"
IF "%PGADMIN_INNOTOOL_DIR%" == "" SET "PGADMIN_INNOTOOL_DIR=C:\Program Files (x86)\Inno Setup 6"
IF "%PGADMIN_VCREDIST_DIR%" == "" SET "PGADMIN_VCREDIST_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Redist\MSVC\14.16.27012"
IF "%PGADMIN_SIGNTOOL_DIR%" == "" SET "PGADMIN_SIGNTOOL_DIR=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64"
REM Set VCREDISTNAME (the filename)
for /f "delims=" %%i in ("%VCREDIST%") do set "VCREDISTNAME=%%~nxi"
REM Set REDIST_NAME (the filename)
set "VCREDIST_FILE=vcredist_%ARCHITECTURE%.exe"
REM Set additional variables we need
SET "QMAKE=%QTDIR%\bin\qmake.exe"
FOR /F "tokens=4,5 delims=. " %%a IN ('%QMAKE% -v ^| findstr /B /C:"Using Qt version "') DO SET QT_VERSION=%%a.%%b
SET "VIRTUALENV=venv"
SET "TARGET_DIR=%WD%\dist"
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\config.py') DO SET APP_MAJOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\config.py') DO SET APP_MINOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\config.py') DO SET APP_VERSION_SUFFIX=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\config.py') DO SET APP_MAJOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\config.py') DO SET APP_MINOR=%%a
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\config.py') DO SET APP_VERSION_SUFFIX=%%a
REM remove single quote from the string
SET APP_VERSION_SUFFIX=%APP_VERSION_SUFFIX:'=%
SET APP_NAME=""
FOR /F "tokens=2* DELims='" %%a IN ('findstr /C:"APP_NAME =" web\config.py') DO SET APP_NAME=%%a
FOR /f "tokens=1 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "print('%APP_NAME%'.lower().replace(' ', ''))"') DO SET APP_SHORTNAME=%%G
FOR /F "tokens=2* DELims='" %%a IN ('findstr /C:"APP_NAME =" web\config.py') DO SET APP_NAME=%%a
FOR /f "tokens=1 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "print('%APP_NAME%'.lower().replace(' ', ''))"') DO SET APP_SHORTNAME=%%G
SET APP_VERSION=%APP_MAJOR%.%APP_MINOR%
SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-%APP_VERSION_SUFFIX%-%ARCHITECTURE%.exe
IF "%APP_VERSION_SUFFIX%" == "" SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-%ARCHITECTURE%.exe
REM get Python version for the runtime build ex. 2.7.1 will be 27
FOR /f "tokens=1 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MAJOR=%%G
FOR /f "tokens=2 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MINOR=%%G
FOR /f "tokens=1 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MAJOR=%%G
FOR /f "tokens=2 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MINOR=%%G
SET "PYTHON_VERSION=%PYTHON_MAJOR%%PYTHON_MINOR%"
EXIT /B 0
@@ -91,32 +86,24 @@ REM Main build sequence Ends
:VALIDATE_ENVIRONMENT
ECHO ****************************************************************
ECHO S U M M A R Y
ECHO * Build summary
ECHO ****************************************************************
ECHO Build path: %PGBUILDPATH%
ECHO Output directory: %TARGET_DIR%
ECHO Build path: %BUILDROOT%
ECHO Output directory: %DISTROOT%
ECHO Installer name: %INSTALLERNAME%
ECHO.
ECHO Python home: %PYTHON_HOME%
ECHO Python DLL: %PYTHON_DLL%
ECHO Python version: %PYTHON_VERSION%
ECHO Python major version: %PYTHON_MAJOR%
ECHO Python minor version: %PYTHON_MINOR%
ECHO Python directory: %PGADMIN_PYTHON_DIR%
ECHO Python DLL: %PGADMIN_PYTHON_DIR%\Python%PYTHON_VERSION%.dll
ECHO Python version: %PYTHON_MAJOR%.%PYTHON_MINOR%
ECHO.
ECHO Qt home: %QTDIR%
ECHO qmake executable: %QMAKE%
ECHO Qt version: %QT_VERSION%
ECHO Qt directory: %PGADMIN_QT_DIR%
ECHO PostgreSQL directory: %PGADMIN_POSTGRES_DIR%
ECHO.
ECHO PostgreSQL home: %PGDIR%
ECHO VC++ redist directory: %PGADMIN_VCREDIST_DIR%
ECHO VC++ redist file: %VCREDIST_FILE%
ECHO InnoTool directory: %PGADMIN_INNOTOOL_DIR%
ECHO signtool directory: %PGADMIN_SIGNTOOL_DIR%
ECHO.
ECHO VC++ redistributable: %VCREDIST%
ECHO VC++ redistributable file: %VCREDISTNAME%
ECHO.
ECHO innotool executable: %INNOTOOL%
ECHO signtool executable: %SIGNTOOL%
ECHO.
ECHO App major version: %APP_MAJOR%
ECHO App minor version: %APP_MINOR%
ECHO App version: %APP_VERSION%
ECHO App version suffix: %APP_VERSION_SUFFIX%
ECHO App short name: %APP_SHORTNAME%
@@ -124,88 +111,87 @@ REM Main build sequence Ends
ECHO ****************************************************************
ECHO Checking the environment...
IF NOT EXIST "%INNOTOOL%" (
ECHO !INNOTOOL! does not exist
ECHO Please install Innotool and set the INNOTOOL environment variable.
IF NOT EXIST "%PGADMIN_INNOTOOL_DIR%" (
ECHO !PGADMIN_INNOTOOL_DIR! does not exist
ECHO Please install InnoTool and set the PGADMIN_INNOTOOL_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%VCREDIST%" (
ECHO !VCREDIST! does not exist
ECHO Please install Microsoft Visual studio and set the VCREDIST environment variable.
IF NOT EXIST "%PGADMIN_VCREDIST_DIR%" (
ECHO !PGADMIN_VCREDIST_DIR! does not exist
ECHO Please install Microsoft Visual studio and set the PGADMIN_VCREDIST_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%QTDIR%" (
ECHO !QTDIR! does not exist.
ECHO Please install Qt and set the QTDIR environment variable.
IF NOT EXIST "%PGADMIN_QT_DIR%" (
ECHO !PGADMIN_QT_DIR! does not exist.
ECHO Please install Qt and set the PGADMIN_QT_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%QMAKE%" (
IF NOT EXIST "%PGADMIN_QT_DIR%\bin\qmake.exe" (
ECHO !QMAKE! does not exist.
ECHO Please install Qt and set the QTDIR environment variable.
ECHO Please install Qt and set the PGADMIN_QT_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PYTHON_HOME%" (
ECHO !PYTHON_HOME! does not exist.
ECHO Please install Python and set the PYTHON_HOME environment variable.
IF NOT EXIST "%PGADMIN_PYTHON_DIR%" (
ECHO !PGADMIN_PYTHON_DIR! does not exist.
ECHO Please install Python and set the PGADMIN_PYTHON_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PYTHON_DLL%" (
ECHO !PYTHON_DLL! does not exist.
ECHO Please install Python and set the PYTHON_DLL environment variable.
IF NOT EXIST "%PGADMIN_PYTHON_DIR%\Python%PYTHON_VERSION%.dll" (
ECHO !PGADMIN_PYTHON_DIR!\Python!PYTHON_VERSION!.dll does not exist.
ECHO Please check your Python installation is complete.
EXIT /B 1
)
IF NOT EXIST "%PGDIR%" (
ECHO !PGDIR! does not exist.
ECHO Please install PostgreSQL and set the PGDIR environment variable.
IF NOT EXIST "%PGADMIN_POSTGRES_DIR%" (
ECHO !PGADMIN_POSTGRES_DIR! does not exist.
ECHO Please install PostgreSQL and set the PGADMIN_POSTGRES_DIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PYTHON_HOME%\Scripts\virtualenv.exe" (
ECHO !PYTHON_HOME!\Scripts\virtualenv.exe does not exist.
IF NOT EXIST "%PGADMIN_PYTHON_DIR%\Scripts\virtualenv.exe" (
ECHO !PGADMIN_PYTHON_DIR!\Scripts\virtualenv.exe does not exist.
ECHO Please install the virtualenv package in Python.
EXIT /B 1
)
SET "PATH=%PGDIR%\bin;%PATH%"
SET "PATH=%PGADMIN_POSTGRES_DIR%\bin;%PATH%"
EXIT /B 0
:CREATE_VIRTUAL_ENV
ECHO Creating virtual environment...
IF NOT EXIST "%PGBUILDPATH%" MKDIR "%PGBUILDPATH%"
IF NOT EXIST "%BUILDROOT%" MKDIR "%BUILDROOT%"
CD "%PGBUILDPATH%"
"%PYTHON_HOME%\Scripts\virtualenv.exe" "%VIRTUALENV%"
CD "%BUILDROOT%"
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\DLLs" "%PGBUILDPATH%\%VIRTUALENV%\DLLs" > nul || EXIT /B 1
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\Lib" "%PGBUILDPATH%\%VIRTUALENV%\Lib" > nul || EXIT /B 1
REM Note that we must use virtualenv.exe here, as the venv module doesn't allow python.exe to relocate.
"%PGADMIN_PYTHON_DIR%\Scripts\virtualenv.exe" venv
ECHO Activating virtual environment - %PGBUILDPATH%\%VIRTUALENV%...
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate" || EXIT /B 1
XCOPY /S /I /E /H /Y "%PGADMIN_PYTHON_DIR%\DLLs" "%BUILDROOT%\venv\DLLs" > nul || EXIT /B 1
XCOPY /S /I /E /H /Y "%PGADMIN_PYTHON_DIR%\Lib" "%BUILDROOT%\venv\Lib" > nul || EXIT /B 1
ECHO Activating virtual environment - %BUILDROOT%\venv...
CALL "%BUILDROOT%\venv\Scripts\activate" || EXIT /B 1
ECHO Installing dependencies...
CALL pip install -r "%WD%\requirements.txt" || EXIT /B 1
CALL pip install sphinx || EXIT /B 1
REM If we're using VC++, and this is Python 3.6+, we need to remove the hack
REM above or it will break qmake. Sigh.
IF "%MAKE%" == "nmake" (
IF %PYTHON_VERSION% GEQ 36 SET CL=
)
REM If this is Python 3.6+, we need to remove the hack above or it will break qmake. Sigh.
IF %PYTHON_VERSION% GEQ 36 SET CL=
CD %WD%
EXIT /B 0
:CREATE_RUNTIME_ENV
MKDIR "%PGBUILDPATH%\runtime"
MKDIR "%BUILDROOT%\runtime"
CD "%WD%\web"
@@ -219,33 +205,37 @@ REM Main build sequence Ends
RD /Q /S "%WD%\web\pgadmin\static\js\generated\.cache" 1> nul 2>&1
ECHO Copying web directory...
XCOPY /S /I /E /H /Y "%WD%\web" "%PGBUILDPATH%\web" > nul || EXIT /B 1
XCOPY /S /I /E /H /Y "%WD%\web" "%BUILDROOT%\web" > nul || EXIT /B 1
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%PGBUILDPATH%\web" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
FOR /R "%BUILDROOT%\web" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
ECHO Removing tests, Python caches and node modules...
FOR /R "%PGBUILDPATH%\web" %%f in (tests feature_tests __pycache__ node_modules) do RD /Q /S "%%f" 1> nul 2>&1
FOR /R "%BUILDROOT%\web" %%f in (tests feature_tests __pycache__ node_modules) do RD /Q /S "%%f" 1> nul 2>&1
ECHO Removing the test framework...
RD /Q /S "%PGBUILDPATH%\web\regression" 1> nul 2>&1
RD /Q /S "%BUILDROOT%\web\regression" 1> nul 2>&1
ECHO Removing tools...
RD /Q /S "%PGBUILDPATH%\web\tools" 1> nul 2>&1
RD /Q /S "%BUILDROOT%\web\tools" 1> nul 2>&1
ECHO Removing any existing configurations...
DEL /q "%PGBUILDPATH%\web\pgadmin4.db" 1> nul 2>&1
DEL /q "%PGBUILDPATH%\web\config_local.py" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\pgadmin4.db" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\config_local.py" 1> nul 2>&1
ECHO Staging license files...
COPY "%WD%\LICENSE" "%BUILDROOT%\" > nul || EXIT /B 1
COPY "%WD%\DEPENDENCIES" "%BUILDROOT%\" > nul || EXIT /B 1
ECHO Creating config_distro.py
ECHO SERVER_MODE = False > "%PGBUILDPATH%\web\config_distro.py"
ECHO HELP_PATH = '../../../docs/en_US/html/' >> "%PGBUILDPATH%\web\config_distro.py"
ECHO DEFAULT_BINARY_PATHS = { >> "%PGBUILDPATH%\web\config_distro.py"
ECHO 'pg': '$DIR/../runtime', >> "%PGBUILDPATH%\web\config_distro.py"
ECHO 'ppas': '' >> "%PGBUILDPATH%\web\config_distro.py"
ECHO } >> "%PGBUILDPATH%\web\config_distro.py"
ECHO SERVER_MODE = False > "%BUILDROOT%\web\config_distro.py"
ECHO HELP_PATH = '../../../docs/en_US/html/' >> "%BUILDROOT%\web\config_distro.py"
ECHO DEFAULT_BINARY_PATHS = { >> "%BUILDROOT%\web\config_distro.py"
ECHO 'pg': '$DIR/../runtime', >> "%BUILDROOT%\web\config_distro.py"
ECHO 'ppas': '' >> "%BUILDROOT%\web\config_distro.py"
ECHO } >> "%BUILDROOT%\web\config_distro.py"
ECHO Building docs...
MKDIR "%PGBUILDPATH%\docs\en_US\html"
MKDIR "%BUILDROOT%\docs\en_US\html"
CD "%WD%\docs\en_US"
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\python.exe" build_code_snippet.py || EXIT /B 1
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\sphinx-build.exe" "%WD%\docs\en_US" "%PGBUILDPATH%\docs\en_US\html" || EXIT /B 1
CALL "%BUILDROOT%\venv\Scripts\python.exe" build_code_snippet.py || EXIT /B 1
CALL "%BUILDROOT%\venv\Scripts\sphinx-build.exe" "%WD%\docs\en_US" "%BUILDROOT%\docs\en_US\html" || EXIT /B 1
ECHO Removing Sphinx
CALL pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
@@ -254,46 +244,50 @@ REM Main build sequence Ends
CD "%WD%\runtime"
ECHO Running qmake...
CALL "%QMAKE%" || EXIT /B 1
CALL set "PGADMIN_PYTHON_DIR=%PGADMIN_PYTHON_DIR%" && "%PGADMIN_QT_DIR%\bin\qmake.exe" || EXIT /B 1
ECHO Cleaning the build directory...
CALL %MAKE% clean || EXIT /B 1
CALL nmake clean || EXIT /B 1
ECHO Running make...
CALL %MAKE% || EXIT /B 1
CALL nmake || EXIT /B 1
ECHO Staging pgAdmin4.exe...
COPY "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%WD%\runtime\release\pgAdmin4.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
ECHO Staging Qt components...
COPY "%QTDIR%\bin\Qt5Core.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%QTDIR%\bin\Qt5Gui.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%QTDIR%\bin\Qt5Widgets.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%QTDIR%\bin\Qt5Network.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%QTDIR%\bin\libgcc_s_dw2-1.dll" COPY "%QTDIR%\bin\libgcc_s_dw2-1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%QTDIR%\bin\libstdc++-6.dll" COPY "%QTDIR%\bin\libstdc++-6.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%QTDIR%\bin\libwinpthread-1.dll" COPY "%QTDIR%\bin\libwinpthread-1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
MKDIR "%PGBUILDPATH%\runtime\platforms" > nul || EXIT /B 1
COPY "%QTDIR%\plugins\platforms\qwindows.dll" "%PGBUILDPATH%\runtime\platforms" > nul || EXIT /B 1
ECHO [Paths] > "%PGBUILDPATH%\runtime\qt.conf"
ECHO Plugins=plugins >> "%PGBUILDPATH%\runtime\qt.conf"
COPY "%PGADMIN_QT_DIR%\bin\Qt5Core.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_QT_DIR%\bin\Qt5Gui.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_QT_DIR%\bin\Qt5Widgets.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_QT_DIR%\bin\Qt5Network.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_QT_DIR%\bin\Qt5Svg.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
MKDIR "%BUILDROOT%\runtime\platforms" > nul || EXIT /B 1
COPY "%PGADMIN_QT_DIR%\plugins\platforms\qwindows.dll" "%BUILDROOT%\runtime\platforms" > nul || EXIT /B 1
MKDIR "%BUILDROOT%\runtime\imageformats" > nul || EXIT /B 1
COPY "%PGADMIN_QT_DIR%\plugins\imageformats\qsvg.dll" "%BUILDROOT%\runtime\imageformats" > nul || EXIT /B 1
ECHO [Paths] > "%BUILDROOT%\runtime\qt.conf"
ECHO Plugins=plugins >> "%BUILDROOT%\runtime\qt.conf"
ECHO Staging PostgreSQL components...
COPY "%PGDIR%\bin\libpq.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGDIR%\bin\ssleay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGDIR%\bin\libeay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%PGDIR%\bin\libintl-*.dll" COPY "%PGDIR%\bin\libintl-*.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%PGDIR%\bin\libiconv-*.dll" COPY "%PGDIR%\bin\libiconv-*.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%PGDIR%\bin\zlib.dll" COPY "%PGDIR%\bin\zlib.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%PGDIR%\bin\zlib1.dll" COPY "%PGDIR%\bin\zlib1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGDIR%\bin\pg_dump.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGDIR%\bin\pg_dumpall.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1L%
COPY "%PGDIR%\bin\pg_restore.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGDIR%\bin\psql.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\libpq.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
IF "%ARCHITECTURE%" == "x64" (
COPY "%PGADMIN_POSTGRES_DIR%\bin\libcrypto-1_1-x64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\libssl-1_1-x64.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
) ELSE (
COPY "%PGADMIN_POSTGRES_DIR%\bin\libcrypto-1_1.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\libssl-1_1.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
)
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libintl-*.dll" COPY "%PGADMIN_POSTGRES_DIR%\bin\libintl-*.dll" "%BUILDROOT%\runtime" > nul
IF EXIST "%PGADMIN_POSTGRES_DIR%\bin\libiconv-*.dll" COPY "%PGADMIN_POSTGRES_DIR%\bin\libiconv-*.dll" "%BUILDROOT%\runtime" > nul
COPY "%PGADMIN_POSTGRES_DIR%\bin\zlib.dll" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_dump.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_dumpall.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1L%
COPY "%PGADMIN_POSTGRES_DIR%\bin\pg_restore.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY "%PGADMIN_POSTGRES_DIR%\bin\psql.exe" "%BUILDROOT%\runtime" > nul || EXIT /B 1
ECHO Staging VC++ runtime...
MKDIR "%PGBUILDPATH%\installer" || EXIT /B 1
COPY "%VCREDIST%" "%PGBUILDPATH%\installer" > nul || EXIT /B 1
MKDIR "%BUILDROOT%\installer" || EXIT /B 1
COPY "%PGADMIN_VCREDIST_DIR%\%VCREDIST_FILE%" "%BUILDROOT%\installer" > nul || EXIT /B 1
CD %WD%
EXIT /B 0
@@ -301,51 +295,51 @@ REM Main build sequence Ends
:CREATE_PYTHON_ENV
ECHO Staging Python...
COPY %PYTHON_DLL% "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY %PYTHON_HOME%\python.exe "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY %PYTHON_HOME%\pythonw.exe "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY %PGADMIN_PYTHON_DIR%\python%PYTHON_VERSION%.dll "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY %PGADMIN_PYTHON_DIR%\python.exe "%BUILDROOT%\runtime" > nul || EXIT /B 1
COPY %PGADMIN_PYTHON_DIR%\pythonw.exe "%BUILDROOT%\runtime" > nul || EXIT /B 1
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%PGBUILDPATH%\%VIRTUALENV%" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
FOR /R "%BUILDROOT%\venv" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
ECHO Removing tests...
FOR /R "%PGBUILDPATH%\%VIRTUALENV%\Lib" %%f in (test tests) do RD /Q /S "%%f" 1> nul 2>&1
FOR /R "%BUILDROOT%\venv\Lib" %%f in (test tests) do RD /Q /S "%%f" 1> nul 2>&1
ECHO Removing TCL...
RD /Q /S "%PGBUILDPATH%\%VIRTUALENV%\tcl" 1> nul 2>&1
RD /Q /S "%BUILDROOT%\venv\tcl" 1> nul 2>&1
EXIT /B 0
:CREATE_INSTALLER
ECHO Preparing for creation of windows installer...
IF NOT EXIST "%TARGET_DIR%" MKDIR "%TARGET_DIR%"
IF NOT EXIST "%DISTROOT%" MKDIR "%DISTROOT%"
ECHO Copying icon file...
COPY "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%" > nul || EXIT /B 1
COPY "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%BUILDROOT%" > nul || EXIT /B 1
CD "%WD%\pkg\win32"
ECHO Processing installer configuration script...
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in" "-o" "%WD%\pkg\win32\installer.iss.in_stage1" "-s" MYAPP_NAME -r """%APP_NAME%"""
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage1" "-o" "%WD%\pkg\win32\installer.iss.in_stage2" "-s" MYAPP_FULLVERSION -r """%APP_VERSION%"""
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss.in_stage3" "-s" MYAPP_VERSION -r """v%APP_MAJOR%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in" "-o" "%WD%\pkg\win32\installer.iss.in_stage1" "-s" MYAPP_NAME -r """%APP_NAME%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage1" "-o" "%WD%\pkg\win32\installer.iss.in_stage2" "-s" MYAPP_FULLVERSION -r """%APP_VERSION%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss.in_stage3" "-s" MYAPP_VERSION -r """v%APP_MAJOR%"""
SET ARCMODE=
IF "%ARCHITECTURE%"=="amd64" (
IF "%ARCHITECTURE%" == "x64" (
set ARCMODE="x64"
)
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage3" "-o" "%WD%\pkg\win32\installer.iss.in_stage4" "-s" MYAPP_ARCHITECTURESMODE -r """%ARCMODE%"""
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage4" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%VCREDISTNAME%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage3" "-o" "%WD%\pkg\win32\installer.iss.in_stage4" "-s" MYAPP_ARCHITECTURESMODE -r """%ARCMODE%"""
CALL "%PGADMIN_PYTHON_DIR%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage4" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%PGADMIN_VCREDIST_DIRNAME%\%VCREDIST_FILE%"""
ECHO Cleaning up...
DEL /s "%WD%\pkg\win32\installer.iss.in_stage*" > nul
ECHO Creating windows installer using INNO tool...
CALL "%INNOTOOL%\ISCC.exe" /q "%WD%\pkg\win32\installer.iss" || EXIT /B 1
CALL "%PGADMIN_INNOTOOL_DIR%\ISCC.exe" /q "%WD%\pkg\win32\installer.iss" || EXIT /B 1
ECHO Renaming installer...
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGET_DIR%\%INSTALLERNAME%" > nul || EXIT /B 1
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%DISTROOT%\%INSTALLERNAME%" > nul || EXIT /B 1
ECHO Location - %TARGET_DIR%\%INSTALLERNAME%
ECHO Location - %DISTROOT%\%INSTALLERNAME%
ECHO Installer generated successfully.
CD %WD%
@@ -354,7 +348,7 @@ REM Main build sequence Ends
:SIGN_INSTALLER
ECHO Attempting to sign the installer...
CALL "%SIGNTOOL%" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGET_DIR%\%INSTALLERNAME%"
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%DISTROOT%\%INSTALLERNAME%"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
@@ -368,15 +362,15 @@ REM Main build sequence Ends
:CLEANUP_ENV
ECHO Cleaning the build environment...
RD "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q 1> nul 2>&1
DEL /s "%PGBUILDPATH%\%VIRTUALENV%\pip-selfcheck.json" 1> nul 2>&1
RD "%BUILDROOT%\venv\Include" /S /Q 1> nul 2>&1
DEL /s "%BUILDROOT%\venv\pip-selfcheck.json" 1> nul 2>&1
EXIT /B 0
:USAGE
ECHO Invalid command line options.
ECHO Usage: "Make.bat <x86 | clean>"
ECHO Usage: "Make.bat [clean]"
ECHO.
EXIT /B 1
+62 -9
View File
@@ -9,6 +9,10 @@
SHELL = /bin/sh
APP_NAME := $(shell grep ^APP_NAME web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]' | tr -d "'" | awk '{print tolower($$0)}')
APP_RELEASE := $(shell grep ^APP_RELEASE web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
APP_REVISION := $(shell grep ^APP_REVISION web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
#########################################################################
# High-level targets
#########################################################################
@@ -20,7 +24,16 @@ appbundle: docs
./pkg/mac/build.sh
install-node:
cd web && yarn install
cd web && npm install
cd web && npm audit fix
rm -f web/yarn.lock
cd web && yarn import
# Commented the below line to avoid vulnerability in lodash package.
# Refer https://www.npmjs.com/advisories/1523.
# Once fixed we will uncomment it.
# cd web && yarn audit
rm -f package-lock.json
rm -f web/package-lock.json
bundle:
cd web && yarn run bundle
@@ -31,21 +44,47 @@ bundle-dev:
linter:
cd web && yarn run linter
check: install-node bundle linter
cd web && pycodestyle --config=.pycodestyle . && yarn run karma start --single-run && python regression/runtests.py
check: install-node bundle linter check-pep8
cd web && yarn run karma start --single-run && python regression/runtests.py
check-audit:
cd web && yarn run audit
check-auditjs:
# Commented the below line to avoid vulnerability in decompress package and
# audit only dependencies folder. Refer https://www.npmjs.com/advisories/1217.
# Pull request is already been send https://github.com/kevva/decompress/pull/73,
# once fixed we will uncomment it.
# cd web && yarn run auditjs
cd web && yarn run auditjs --groups dependencies
check-auditjs-html:
cd web && yarn run auditjs-html
check-auditpy:
cd web && yarn run auditpy
check-pep8:
cd web && pycodestyle --config=.pycodestyle .
pycodestyle --config=.pycodestyle docs/
pycodestyle --config=.pycodestyle pkg/
pycodestyle --config=.pycodestyle web/
pycodestyle --config=.pycodestyle tools/
check-python:
cd web && python regression/runtests.py --exclude feature_tests
check-resql:
cd web && python regression/runtests.py --pkg resql --exclude feature_tests
check-feature: install-node bundle
cd web && python regression/runtests.py --pkg feature_tests
check-js: install-node linter
cd web && yarn run karma start --single-run
check-js-coverage:
cd web && yarn run test:karma-coverage
runtime-debug:
cd runtime && qmake CONFIG+=debug && make
@@ -53,20 +92,21 @@ runtime:
cd runtime && qmake CONFIG+=release && make
# Include all clean sub-targets in clean
clean: clean-appbundle clean-docker clean-dist clean-docs clean-node clean-pip clean-src clean-runtime
clean: clean-appbundle clean-debian clean-dist clean-docs clean-node clean-pip clean-redhat clean-src clean-runtime
rm -rf web/pgadmin/static/js/generated/*
rm -rf web/pgadmin/static/js/generated/.cache
rm -rf web/pgadmin/static/css/generated/*
rm -rf web/pgadmin/static/css/generated/.cache
clean-runtime:
cd runtime && make clean
if [ -f runtime/Makefile ]; then (cd runtime && make clean); fi;
rm -rf build-*
clean-appbundle:
rm -rf mac-build/
clean-docker:
rm -rf docker-build/
clean-debian:
rm -rf debian-build/
clean-dist:
rm -rf dist/
@@ -80,11 +120,18 @@ clean-node:
clean-pip:
rm -rf pip-build/
clean-redhat:
rm -rf redhat-build/
clean-src:
rm -rf src-build/
debian:
./pkg/debian/build.sh
docker:
./pkg/docker/build.sh
echo $(APP_NAME)
docker build -t ${APP_NAME} -t $(APP_NAME):latest -t $(APP_NAME):$(APP_RELEASE) -t $(APP_NAME):$(APP_RELEASE).$(APP_REVISION) .
docs:
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html
@@ -92,6 +139,9 @@ docs:
docs-pdf:
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx latexpdf
docs-epub:
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx epub
messages: msg-extract msg-update msg-compile
msg-compile:
@@ -108,5 +158,8 @@ msg-update:
pip: docs
./pkg/pip/build.sh
redhat:
./pkg/redhat/build.sh
src:
./pkg/src/build.sh
+57 -85
View File
@@ -1,4 +1,4 @@
pgAdmin 4
pgAdmin 4
=========
pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the
@@ -26,42 +26,46 @@ Building the Runtime
To build the runtime, the following packages must be installed:
- QT 4.6 or above
- Python 2.7 or 3.4+
- QT 5 (Use the VC++ build on Windows, not MinGW).
- Python 3.4+
Assuming both qmake and python-config are in the path:
An environment variable named PGADMIN_PYTHON_DIR must be set to the directory
in which Python has been installed, for example:
$ cd $PGADMIN4_SRC/runtime
$ qmake
Project MESSAGE: Building for QT5+...
Project MESSAGE: Building for Linux/Mac...
Project MESSAGE: Using /usr/bin/python-config
Project MESSAGE: Python2 detected.
$ make
...
- /usr
- /usr/local/python-3.8
- C:\Python38
To build the runtime in debug mode, use the option below with qmake
Assuming both qmake is in the path:
dpage@hal:~/git/pgadmin4$ cd runtime
dpage@hal:~/git/pgadmin4/runtime$ export PGADMIN_PYTHON_DIR=/opt/local
dpage@hal:~/git/pgadmin4/runtime$ qmake
Project MESSAGE: ==================================
Project MESSAGE: Configuring the pgAdmin 4 runtime.
Project MESSAGE: ==================================
Project MESSAGE: Qt version: 5
Project MESSAGE: Platform: macOS
Project MESSAGE: Python executable: /opt/local/bin/python3
Project MESSAGE: Python version: 3.8 (38)
Project MESSAGE: Python config: /opt/local/bin/python3-config
Project MESSAGE: CXXFLAGS: -pipe -stdlib=libc++ -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8
Project MESSAGE: LDFLAGS: -stdlib=libc++ -L/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/config-3.8-darwin -ldl -framework CoreFoundation
Project MESSAGE: LIBS: -lpython3.8 -ldl -framework CoreFoundation
dpage@hal:~/git/pgadmin4/runtime$ make
...
To build the runtime in debug mode, use the option below with qmake:
$ qmake CONFIG+=debug
To build the runtime in release mode, use the option below with qmake
To build the runtime in release mode, use the option below with qmake:
$ qmake CONFIG+=release
By default, the runtime application will be built in release mode.
On Linux, an executable called 'pgAdmin4' will be built, and on Mac OS X, an
app bundle called pgAdmin4.app will be created.
To build the runtime on a Windows system, export PYTHON_HOME and PYTHON_VERSION
variables in the System environment. Specify the PYTHON_VERSION with the major
and minor number. Do not specify micro level version.
For example, given a Python version of A.B.C; A - Major number, B - Minor
number, C - Micro level (Bug fix releases).
If Python version is 2.7.12 than specify PYTHON_VERSION=27
e.g. PYTHON_HOME=C:\Python27\
PYTHON_VERSION=27
On Linux, an executable called 'pgAdmin4' will be built, on Windows,
'pgAdmin4.exe', and on Mac OS X, an app bundle called pgAdmin4.app will be
created.
You can also use Qt Creator to build, develop and debug the runtime. Simply
open the $PGADMIN4_SRC/runtime/pgAdmin4.pro project file in Qt Creator and
@@ -88,10 +92,10 @@ Configuring the Python Environment
----------------------------------
In order to run the Python code, a suitable runtime environment is required.
Python versions - Python 2.7 or 3.4+ are currently supported. It is
recommended that a Python Virtual Environment is setup for this purpose,
rather than using the system Python environment. On Linux and Mac systems, the
process is fairly simple - adapt as required for your distribution:
Python version 3.4 and later are currently supported. It is recommended that a
Python Virtual Environment is setup for this purpose, rather than using the
system Python environment. On Linux and Mac systems, the process is fairly
simple - adapt as required for your distribution:
1) Install the virtualenv packages into the system Python environment
@@ -181,16 +185,7 @@ server or desktop mode, and access it from a web browser using the URL shown in
the terminal once pgAdmin has started up.
Setup of an environment on Windows is somewhat more complicated unfortunately,
largely due to the lack of a native compiler toolset. Thankfully, Microsoft
supply a free compiler specifically for Python 2.7 users. Download and install
it from:
https://www.microsoft.com/en-gb/download/details.aspx?id=44266
A blog detailing the setup of Virtual Environments on Windows can be found
here:
http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/
please see pkg/win32/README.txt for complete details.
Once a virtual environment has been created and enabled, setup can continue
from step 4 above.
@@ -219,6 +214,23 @@ can be used:
C:\$PGADMIN4_SRC\web> yarn install
C:\$PGADMIN4_SRC\web> yarn run bundle
Creating pgAdmin themes
-----------------------
To create a pgAdmin theme, you need to create a directory under
web/pgadmin/static/scss/resources.
Copy the sample file _theme.variables.scss.sample to the new directory and
rename it to _theme.variables.scss. Change the desired hexadecimal values of
the colors and bundle pgAdmin. You can also add a preview image in the theme
directory with the name as <dir name>_preview.png. It is recommended that the
preview image should not be larger in size as it may take time to load on slow
networks. Run the yarn run bundle and you're good to go. No other changes are
required, pgAdmin bundle will read the directory and create other required
entries to make them available in preferences.
The name of the theme is derived from the directory name. Underscores (_) and
hyphens (-) will be replaced with spaces and the result will be camel cased.
Configuring the Runtime
-----------------------
@@ -235,7 +247,7 @@ icon and select the Configuration option to open the configuration dialogue.
On a Linux/Mac system, the Python Path will typically consist of a single path
to the virtual environment's site-packages directory, e.g.
/Users/<USERNAME>/.virtualenvs/pgadmin4/lib/python2.7/site-packages
/Users/<USERNAME>/.virtualenvs/pgadmin4/lib/python3.8/site-packages
On Windows, multiple paths are likely to be required, e.g.
@@ -277,49 +289,9 @@ run:
(pgadmin4) $ make pip
On a Mac, build an application bundle in a disk image (DMG file) with:
To build the macOS AppBundle, please see pkg/mac/README.
(pgadmin4) $ make appbundle
Configure the framework.conf to match the QT and Python versions the app is
being built with:
$ cp $PGADMIN4_SRC/pkg/mac/framework.conf.in $PGADMIN4_SRC/pkg/mac/framework.conf
$ vi $PGADMIN4_SRC/pkg/mac/framework.conf
If you have an Apple code signing certificate, both the app bundle and disk
image can be automatically signed by configuring signing:
$ cp $PGADMIN4_SRC/pkg/mac/codesign.conf.in $PGADMIN4_SRC/pkg/mac/codesign.conf
$ vi $PGADMIN4_SRC/pkg/mac/codesign.conf
Edit the file as appropriate, ensuring the various version numbers are correct
and that the appropriate developer ID is specified.
On Windows, the InnoSetup tool is required to create an installer. Download the
Unicode version from:
http://www.jrsoftware.org/isdl.php
A number of environment variables may need to be set to enable the build script
to function. The defaults will usually work on a typical 64 bit system with
Qt 5.5.1, Python 2.7 and Visual Studio 2013. The examples below are for a
similar 32 bit system:
INNOTOOL=C:\Program Files\Inno Setup 5
PGDIR=C:\Program Files\PostgreSQL\10
PYTHON_DLL=C:\Windows\System32\Python27.dll
PYTHON_HOME=C:\Python27
PYTHON_VERSION=27
QTDIR=C:\Qt\5.9\msvc2013
VCDIR=C:\Program Files\Microsoft Visual Studio 12.0\VC
To build the installer:
C:\$PGADMIN4_SRC> make x86
If you have a code signing certificate, this will automatically be used if
found in the Windows Certificate Store to sign the installer.
To build the Windows installer, please see pkg/win32/README.txt.
Support
-------
-17
View File
@@ -1,17 +0,0 @@
#!/bin/sh
echo "EXECUTING: Build docs"
echo
cd ${WORKSPACE}
. ${WORKSPACE}/pgadmin-venv/bin/activate
SPHINX_VER=""
if [ "${PYTHON_VERSION}" = "2.6" -o "${PYTHON_VERSION}" = "3.3" ]; then
SPHINX_VER="==1.4.9"
fi
${WORKSPACE}/pgadmin-venv/bin/pip install Sphinx${SPHINX_VER} || { echo 'ERROR: Failed to install Sphinx to build the docs.' ; exit 1; }
make docs || { echo 'ERROR: Failed to build the documentation.' ; exit 1; }
-17
View File
@@ -1,17 +0,0 @@
#!/bin/sh
echo "EXECUTING: Build PIP wheel"
echo
cd ${WORKSPACE}
. ${WORKSPACE}/pgadmin-venv/bin/activate
SPHINX_VER=""
if [ "${PYTHON_VERSION}" = "2.6" -o "${PYTHON_VERSION}" = "3.3" ]; then
SPHINX_VER="==1.4.9"
fi
${WORKSPACE}/pgadmin-venv/bin/pip install Sphinx${SPHINX_VER} || { echo 'ERROR: Failed to install Sphinx to build the PIP wheel.' ; exit 1; }
make pip || { echo 'ERROR: Failed to build the PIP wheel.' ; exit 1; }
-16
View File
@@ -1,16 +0,0 @@
#!/bin/sh
echo "EXECUTING: Build runtime - QT4"
echo
if [ ${PYTHON_VERSION:0:1} == "3" ]; then
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python3-config
else
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python-config
fi
cd ${WORKSPACE}/runtime
make clean
PATH=/usr/local/python-${PYTHON_VERSION}/bin:$PATH PYTHON_CONFIG=${CONFIG} /bin/qmake-qt4 || { echo 'ERROR: Failed to run the QT4 qmake step.' ; exit 1; }
make all || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
-16
View File
@@ -1,16 +0,0 @@
#!/bin/sh
echo "EXECUTING: Build runtime - QT5"
echo
if [ ${PYTHON_VERSION:0:1} == "3" ]; then
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python3-config
else
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python-config
fi
cd ${WORKSPACE}/runtime
make clean
PATH=/usr/local/python-${PYTHON_VERSION}/bin:$PATH PYTHON_CONFIG=${CONFIG} /bin/qmake-qt5 DEFINES+=PGADMIN4_USE_WEBKIT || { echo 'ERROR: Failed to run the QT5 qmake step.' ; exit 1; }
make all || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
-17
View File
@@ -1,17 +0,0 @@
#!/bin/sh
echo "EXECUTING: Build Tarballs"
echo
cd ${WORKSPACE}
. ${WORKSPACE}/pgadmin-venv/bin/activate
SPHINX_VER=""
if [ "${PYTHON_VERSION}" = "2.6" -o "${PYTHON_VERSION}" = "3.3" ]; then
SPHINX_VER="==1.4.9"
fi
${WORKSPACE}/pgadmin-venv/bin/pip install Sphinx${SPHINX_VER} || { echo 'ERROR: Failed to install Sphinx to build the tarballs.' ; exit 1; }
cd ${WORKSPACE}/
make src || { echo 'ERROR: Failed to build the tarballs.' ; exit 1; }
-11
View File
@@ -1,11 +0,0 @@
#!/bin/sh
${WORKSPACE}/ci/create_config.sh || { echo 'ERROR: Failed to create the configuration.' ; exit 1; }
${WORKSPACE}/ci/run_python_tests.sh || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
${WORKSPACE}/ci/run_jasmine_tests.sh || { echo 'ERROR: Error detected when running the Jasmine tests.' ; exit 1; }
${WORKSPACE}/ci/build_docs.sh || { echo 'ERROR: Failed to build the documentation.' ; exit 1; }
${WORKSPACE}/ci/build_runtime_qt4.sh || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
${WORKSPACE}/ci/build_runtime_qt5.sh || { echo 'ERROR: Failed to build the QT5 runtime.' ; exit 1; }
${WORKSPACE}/ci/update_messages.sh || { echo 'ERROR: Failed to update translation message catalogs.' ; exit 1; }
${WORKSPACE}/ci/build_pip_wheel.sh || { echo 'ERROR: Failed to build the PIP wheel.' ; exit 1; }
${WORKSPACE}/ci/build_tarballs.sh || { echo 'ERROR: Failed to build the tarballs.' ; exit 1; }
-15
View File
@@ -1,15 +0,0 @@
#!/bin/sh
echo "EXECUTING: Create pgAdmin config"
echo
cd ${WORKSPACE}
cp ${JENKINS_HOME}/pgadmin-configs/config_local.py ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
echo LOG_FILE = \"${WORKSPACE}/var/pgadmin4.log\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
echo SESSION_DB_PATH = \"${WORKSPACE}/var/sessions\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
echo STORAGE_DIR = \"${WORKSPACE}/var/storage\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
echo SQLITE_PATH = \"${WORKSPACE}/var/pgadmin4.db\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
echo TEST_SQLITE_PATH = \"${WORKSPACE}/var/pgadmin4.db\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
cp ${JENKINS_HOME}/pgadmin-configs/test_config.json ${WORKSPACE}/web/regression/test_config.json || { echo 'ERROR: Failed to copy the test configuration.' ; exit 1; }
-49
View File
@@ -1,49 +0,0 @@
#!/bin/sh
echo "EXECUTING: Feature tests"
echo
echo "Starting virtual frame buffer..."
echo
Xvfb -ac :99 -screen 0 1280x1024x16 &
FB_PID=$!
export DISPLAY=:99
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
echo
cd ${WORKSPACE}/
PYTHON_SUFFIX=""
if [[ "${PYTHON_VERSION}" == 3* ]]; then
PYTHON_SUFFIX="3"
fi
if [ "${PYTHON_VERSION}" == 2.6 -o "${PYTHON_VERSION}" == 3.3 ]; then
/usr/bin/virtualenv --no-wheel -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
${WORKSPACE}/pgadmin-venv/bin/pip install wheel==0.29.0 || { echo 'ERROR: Failed to install wheel 0.29.0.' ; exit 1; }
else
/usr/bin/virtualenv -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
fi
${WORKSPACE}/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
${WORKSPACE}/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
cd web
/usr/bin/yarn install || { echo 'ERROR: Failed to install the required Javascript modules.' ; exit 1; }
/usr/bin/yarn run bundle || { echo 'ERROR: Failed to bundle the Javascript code.' ; exit 1; }
cd ../
echo "Running regression tests..."
echo
${WORKSPACE}/pgadmin-venv/bin/python ${WORKSPACE}/web/regression/runtests.py --pkg feature_tests || { echo 'ERROR: Error detected when running the Feature tests.' ; exit 1; }
echo "Cleaning up..."
echo
kill ${FB_PID}
-10
View File
@@ -1,10 +0,0 @@
#!/bin/sh
echo "EXECUTING: Jasmine tests"
echo
cd ${WORKSPACE}/web/
/usr/bin/yarn install || { echo 'ERROR: Failed to install the required Javascript modules.' ; exit 1; }
/usr/bin/yarn run linter || { echo 'ERROR: Failed to lint the Javascript code.' ; exit 1; }
./node_modules/.bin/karma start --single-run || { echo 'ERROR: Error detected when running the Jasmine tests.' ; exit 1; }
-38
View File
@@ -1,38 +0,0 @@
#!/bin/sh
echo "EXECUTING: Python tests"
echo
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
echo
cd ${WORKSPACE}/
PYTHON_SUFFIX=""
if [[ "${PYTHON_VERSION}" == 3* ]]; then
PYTHON_SUFFIX="3"
fi
if [ "${PYTHON_VERSION}" == 2.6 -o "${PYTHON_VERSION}" == 3.3 ]; then
/usr/bin/virtualenv --no-wheel -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
${WORKSPACE}/pgadmin-venv/bin/pip install wheel==0.29.0 || { echo 'ERROR: Failed to install wheel 0.29.0.' ; exit 1; }
else
/usr/bin/virtualenv -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
fi
${WORKSPACE}/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
${WORKSPACE}/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
echo "Running PEP-8 checks..."
echo
make check-pep8 || { echo 'ERROR: Error detected when running the Python PEP-8 checks.' ; exit 1; }
echo "Running regression tests..."
echo
${WORKSPACE}/pgadmin-venv/bin/python ${WORKSPACE}/web/regression/runtests.py --exclude feature_tests || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
-14
View File
@@ -1,14 +0,0 @@
#!/bin/sh
echo "EXECUTING: Compile messages"
echo
cd ${WORKSPACE}/web
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
pybabel extract -F babel.cfg -o pgadmin/messages.pot pgadmin || { echo 'ERROR: Failed to extract messages from the source code.' ; exit 1; }
pybabel update -i pgadmin/messages.pot -d pgadmin/translations || { echo 'ERROR: Failed to update message catalogs from the template.' ; exit 1; }
pybabel compile -d pgadmin/translations || { echo 'ERROR: Failed to compile the message catalogs.' ; exit 1; }
+12 -5
View File
@@ -1,18 +1,25 @@
.. _add_restore_point_dialog:
***************************************
`Add named restore point Dialog`:index:
`Add Named Restore Point Dialog`:index:
***************************************
Use the *Add named restore point* dialog to take a named snapshot of the state of the server for use in a recovery file. To create a named restore point, the server's postgresql.conf file must specify a *wal_level* value of *archive*, *hot_standby*, or *logical*. You must be a database superuser to create a restore point.
Use the *Add named restore point* dialog to take a named snapshot of the state
of the server for use in a recovery file. To create a named restore point, the
server's postgresql.conf file must specify a *wal_level* value of *archive*,
*hot_standby*, or *logical*. You must be a database superuser to create a
restore point.
.. image:: images/add_restore_point.png
:alt: Restore point dialog
:align: center
When the *Restore point name* window launches, use the field *Enter the name of the restore point to add* to provide a descriptive name for the restore point.
When the *Restore point name* window launches, use the field *Enter the name of
the restore point to add* to provide a descriptive name for the restore point.
For more information about using a restore point as a recovery target, please see the `PostgreSQL
documentation <http://www.postgresql.org/docs/9.5/static/recovery-target-settings.html#RECOVERY-TARGET-NAME>`_.
For more information about using a restore point as a recovery target, please
see the
`PostgreSQL documentation <https://www.postgresql.org/docs/current/recovery-target-settings.html#RECOVERY-TARGET-NAME>`_.
* Click the *OK* button to save the restore point.
* Click the *Cancel* button to exit without saving work.
+3 -3
View File
@@ -4,9 +4,9 @@
`Backup and Restore`:index:
***************************
A powerful, but user-friendly Backup and Restore tool provides an easy way to use pg_dump, pg_dumpall, and pg_restore to take backups and create copies of databases or database objects for use in a development environment.
Contents:
A powerful, but user-friendly Backup and Restore tool provides an easy way to
use pg_dump, pg_dumpall, and pg_restore to take backups and create copies of
databases or database objects for use in a development environment.
.. toctree::
+140 -45
View File
@@ -4,120 +4,215 @@
`Backup Dialog`:index:
**********************
Using the *pg_dump* utility, *pgAdmin* provides an easy way to create a backup in a plain-text or archived format. You can then use a client application (like *psql* or the *Query Tool*) to restore a plain-text backup file, or use the Postgres *pg_restore* utility to restore an archived backup. The *pg_dump* utility must have read access to all database objects that you want to back up.
Using the *pg_dump* utility, *pgAdmin* provides an easy way to create a backup
in a plain-text or archived format. You can then use a client application (like
*psql* or the *Query Tool*) to restore a plain-text backup file, or use the
Postgres *pg_restore* utility to restore an archived backup. The *pg_dump*
utility must have read access to all database objects that you want to back up.
You can backup a single table, a schema, or a complete database. Select the name of the backup source in the *pgAdmin* tree control, right click to open the context menu, and select *Backup...* to open the *Backup* dialog. The name of the object selected will appear in the dialog title bar.
You can backup a single table, a schema, or a complete database. Select the name
of the backup source in the *pgAdmin* tree control, right click to open the
context menu, and select *Backup...* to open the *Backup* dialog. The name of
the object selected will appear in the dialog title bar.
.. image:: images/backup_general.png
:alt: Backup dialog general tab
:align: center
Use the fields in the *General* tab to specify parameters for the backup:
* Enter the name of the backup file in the *Filename* field. Optionally, select the *Browser* icon (...) to the right to navigate into a directory and select a file that will contain the archive.
* Use the drop-down listbox in the *Format* field to select the format that is best suited for your application. Each format has advantages and disadvantages:
* Enter the name of the backup file in the *Filename* field. Optionally, select
the *Browser* icon (...) to the right to navigate into a directory and select
a file that will contain the archive.
* Select *Custom* to create a custom archive file that you can use with *pg_restore* to create a copy of a database. Custom archive file formats must be restored with *pg_restore*. This format offers the opportunity to select which database objects to restore from the backup file. *Custom* archive format is recommended for medium to large databases as it is compressed by default.
* Use the drop-down listbox in the *Format* field to select the format that is
best suited for your application. Each format has advantages and
disadvantages:
* Select *Tar* to generate a tar archive file that you can restore with *pg_restore*. The tar format does not support compression.
* Select *Custom* to create a custom archive file that you can use with
*pg_restore* to create a copy of a database. Custom archive file formats
must be restored with *pg_restore*. This format offers the opportunity to
select which database objects to restore from the backup file. *Custom*
archive format is recommended for medium to large databases as it is
compressed by default.
* Select *Plain* to create a plain-text script file. A plain-text script file contains SQL statements and commands that you can execute at the *psql* command line to recreate the database objects and load the table data. A plain-text backup file can be edited in a text editor, if desired, before using the *psql* program to restore database objects. *Plain* format is normally recommended for smaller databases; script dumps are not recommended for blobs. The SQL commands within the script will reconstruct the database to the last saved state of the database. A plain-text script can be used to reconstruct the database on another machine, or (with modifications) on other architectures.
* Select *Tar* to generate a tar archive file that you can restore with
*pg_restore*. The tar format does not support compression.
* Select *Directory* to generate a directory-format archive suitable for use with *pg_restore*. This file format creates a directory with one file for each table and blob being dumped, plus a *Table of Contents* file describing the dumped objects in a machine-readable format that *pg_restore* can read. This format is compressed by default.
* Select *Plain* to create a plain-text script file. A plain-text script file
contains SQL statements and commands that you can execute at the *psql*
command line to recreate the database objects and load the table data. A
plain-text backup file can be edited in a text editor, if desired, before
using the *psql* program to restore database objects. *Plain* format is
normally recommended for smaller databases; script dumps are not
recommended for blobs. The SQL commands within the script will reconstruct
the database to the last saved state of the database. A plain-text script
can be used to reconstruct the database on another machine, or (with
modifications) on other architectures.
* Use the *Compression Ratio* field to select a compression level for the backup. Specify a value of zero to mean use no compression; specify a maximum compression value of 9. Please note that tar archives do not support compression.
* Use the *Encoding* drop-down listbox to select the character encoding method that should be used for the archive.
* Use the *Number of Jobs* field (when applicable) to specify the number of tables that will be dumped simultaneously in a parallel backup.
* Use the dropdown listbox next to *Rolename* to specify the role that owns the backup.
* Select *Directory* to generate a directory-format archive suitable for use
with *pg_restore*. This file format creates a directory with one file for
each table and blob being dumped, plus a *Table of Contents* file
describing the dumped objects in a machine-readable format that
*pg_restore* can read. This format is compressed by default.
Click the *Dump options* tab to continue. Use the box fields in the *Dump options* tab to provide options for *pg_dump*.
* Use the *Compression Ratio* field to select a compression level for the
backup. Specify a value of zero to mean use no compression; specify a maximum
compression value of 9. Please note that tar archives do not support
compression.
* Use the *Encoding* drop-down listbox to select the character encoding method
that should be used for the archive.
* Use the *Number of Jobs* field (when applicable) to specify the number of
tables that will be dumped simultaneously in a parallel backup.
* Use the dropdown listbox next to *Rolename* to specify the role that owns the
backup.
Click the *Dump options* tab to continue. Use the box fields in the *Dump
options* tab to provide options for *pg_dump*.
.. image:: images/backup_sections.png
:alt: Sections option on backup dialog
:align: center
* Move switches in the **Sections** field box to select a portion of the object that will be backed up.
* Move switches in the **Sections** field box to select a portion of the object
that will be backed up.
* Move the switch next to *Pre-data* to the *Yes* position to include all data definition items not included in the data or post-data item lists.
* Move the switch next to *Pre-data* to the *Yes* position to include all
data definition items not included in the data or post-data item lists.
* Move the switch next to *Data* to the *Yes* position to backup actual table data, large-object contents, and sequence values.
* Move the switch next to *Data* to the *Yes* position to backup actual table
data, large-object contents, and sequence values.
* Move the switch next to *Post-data* to the *Yes* position to include definitions of indexes, triggers, rules, and constraints other than validated check constraints.
* Move the switch next to *Post-data* to the *Yes* position to include
definitions of indexes, triggers, rules, and constraints other than
validated check constraints.
.. image:: images/backup_objects.png
:alt: Type of objects option on backup dialog
:align: center
* Move switches in the **Type of objects** field box to specify details about the type of objects that will be backed up.
* Move switches in the **Type of objects** field box to specify details about
the type of objects that will be backed up.
* Move the switch next to *Only data* to the *Yes* position to limit the back up to data.
* Move the switch next to *Only data* to the *Yes* position to limit the back
up to data.
* Move the switch next to *Only schema* to limit the back up to schema-level database objects.
* Move the switch next to *Only schema* to limit the back up to schema-level
database objects.
* Move the switch next to *Blobs* to the *No* position to exclude large objects in the backup.
* Move the switch next to *Blobs* to the *No* position to exclude large
objects in the backup.
.. image:: images/backup_do_not_save.png
:alt: Do not save option on backup dialog
:align: center
* Move switches in the **Do not save** field box to select the objects that will not be included in the backup.
* Move switches in the **Do not save** field box to select the objects that will
not be included in the backup.
* Move the switch next to *Owner* to the *Yes* position to exclude commands that set object ownership.
* Move the switch next to *Owner* to the *Yes* position to exclude commands
that set object ownership.
* Move the switch next to *Privilege* to the *Yes* position to exclude commands that create access privileges.
* Move the switch next to *Privilege* to the *Yes* position to exclude
commands that create access privileges.
* Move the switch next to *Tablespace* to the *Yes* position to exclude tablespaces.
* Move the switch next to *Tablespace* to the *Yes* position to exclude
tablespaces.
* Move the switch next to *Unlogged table data* to the *Yes* position to exclude the contents of unlogged tables.
* Move the switch next to *Unlogged table data* to the *Yes* position to
exclude the contents of unlogged tables.
* Move the switch next to *Comments* to the *Yes* position to exclude commands that set the comments. **Note:** This option is visible only for database server greater than or equal to 11.
* Move the switch next to *Comments* to the *Yes* position to exclude
commands that set the comments. **Note:** This option is visible only for
database server greater than or equal to 11.
.. image:: images/backup_queries.png
:alt: Queries option on backup dialog
:align: center
* Move switches in the **Queries** field box to specify the type of statements that should be included in the backup.
* Move switches in the **Queries** field box to specify the type of statements
that should be included in the backup.
* Move the switch next to *Use Column Inserts* to the *Yes* position to dump the data in the form of INSERT statements and include explicit column names. Please note: this may make restoration from backup slow.
* Move the switch next to *Use Column Inserts* to the *Yes* position to dump
the data in the form of INSERT statements and include explicit column
names. Please note: this may make restoration from backup slow.
* Move the switch next to *Use Insert commands* to the *Yes* position to dump the data in the form of INSERT statements rather than using a COPY command. Please note: this may make restoration from backup slow.
* Move the switch next to *Use Insert commands* to the *Yes* position to
dump the data in the form of INSERT statements rather than using a COPY
command. Please note: this may make restoration from backup slow.
* Move the switch next to *Include CREATE DATABASE statement* to the *Yes* position to include a command in the backup that creates a new database when restoring the backup.
* Move the switch next to *Include CREATE DATABASE statement* to the *Yes*
position to include a command in the backup that creates a new database
when restoring the backup.
* Move the switch next to *Include DROP DATABASE statement* to the *Yes* position to include a command in the backup that will drop any existing database object with the same name before recreating the object during a backup.
* Move the switch next to *Include DROP DATABASE statement* to the *Yes*
position to include a command in the backup that will drop any existing
database object with the same name before recreating the object during a
backup.
* Move the switch next to *Load Via Partition Root* to the *Yes* position, so when dumping a COPY or INSERT statement for a partitioned table, target the root of the partitioning hierarchy which contains it rather than the partition itself. **Note:** This option is visible only for database server greater than or equal to 11.
* Move the switch next to *Load Via Partition Root* to the *Yes* position,
so when dumping a COPY or INSERT statement for a partitioned table, target
the root of the partitioning hierarchy which contains it rather than the
partition itself. **Note:** This option is visible only for database server
greater than or equal to 11.
.. image:: images/backup_disable.png
:alt: Disable option on backup dialog
:align: center
* Move switches in the **Disable** field box to specify the type of statements that should be excluded from the backup.
* Move switches in the **Disable** field box to specify the type of statements
that should be excluded from the backup.
* Move the switch next to *Trigger* (active when creating a data-only backup) to the *Yes* position to include commands that will disable triggers on the target table while the data is being loaded.
* Move the switch next to *Trigger* (active when creating a data-only backup)
to the *Yes* position to include commands that will disable triggers on the
target table while the data is being loaded.
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar quoting within function bodies; if disabled, the function body will be quoted using SQL standard string syntax.
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar
quoting within function bodies; if disabled, the function body will be
quoted using SQL standard string syntax.
.. image:: images/backup_miscellaneous.png
:alt: Miscellaneous option on backup dialog
:align: center
* Move switches in the **Miscellaneous** field box to specify miscellaneous backup options.
* Move switches in the **Miscellaneous** field box to specify miscellaneous
backup options.
* Move the switch next to *With OIDs* to the *Yes* position to include object identifiers as part of the table data for each table.
* Move the switch next to *With OIDs* to the *Yes* position to include object
identifiers as part of the table data for each table.
* Move the switch next to *Verbose messages* to the *No* position to instruct *pg_dump* to exclude verbose messages.
* Move the switch next to *Verbose messages* to the *No* position to instruct
*pg_dump* to exclude verbose messages.
* Move the switch next to *Force double quotes on identifiers* to the *Yes* position to force the quoting of all identifiers.
* Move the switch next to *Force double quotes on identifiers* to the *Yes*
position to force the quoting of all identifiers.
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes* position to include a statement that will use a SET SESSION AUTHORIZATION command to determine object ownership (instead of an ALTER OWNER command).
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes*
position to include a statement that will use a SET SESSION AUTHORIZATION
command to determine object ownership (instead of an ALTER OWNER command).
When you’ve specified the details that will be incorporated into the pg_dump command:
When you’ve specified the details that will be incorporated into the pg_dump
command:
* Click the *Backup* button to build and execute a command that builds a backup
based on your selections on the *Backup* dialog.
* Click the *Backup* button to build and execute a command that builds a backup based on your selections on the *Backup* dialog.
* Click the *Cancel* button to exit without saving work.
.. image:: images/backup_messages.png
:alt: Backup success notification popup
:align: center
Use the **Stop Process** button to stop the Backup process.
If the backup is successful, a popup window will confirm success. Click *Click here for details* on the popup window to launch the *Process Watcher*. The *Process Watcher* logs all the activity associated with the backup and provides additional information for troubleshooting.
If the backup is successful, a popup window will confirm success. Click *Click
here for details* on the popup window to launch the *Process Watcher*. The
*Process Watcher* logs all the activity associated with the backup and provides
additional information for troubleshooting.
.. image:: images/backup_process_watcher.png
:alt: Backup process watcher
:align: center
If the backup is unsuccessful, you can review the error messages returned by the backup command on the *Process Watcher*.
If the backup is unsuccessful, you can review the error messages returned by the
backup command on the *Process Watcher*.
+28 -9
View File
@@ -4,31 +4,50 @@
`Backup Globals Dialog`:index:
******************************
Use the *Backup Globals* dialog to create a plain-text script that recreates all of the database objects within a cluster, and the global objects that are shared by those databases. Global objects include tablespaces, roles, and object properties. You can use the pgAdmin *Query Tool* to play back a plain-text script, and recreate the objects in the backup.
Use the *Backup Globals* dialog to create a plain-text script that recreates all
of the database objects within a cluster, and the global objects that are shared
by those databases. Global objects include tablespaces, roles, and object
properties. You can use the pgAdmin *Query Tool* to play back a plain-text
script, and recreate the objects in the backup.
.. image:: images/backup_globals_general.png
:alt: Backup globals dialog
:align: center
Use the fields in the *General* tab to specify the following:
* Enter the name of the backup file in the *Filename* field. Optionally, select the *Browser* icon (ellipsis) to the right to navigate into a directory and select a file that will contain the archive.
* Use the drop-down listbox next to *Role name* to specify a role with connection privileges on the selected server. The role will be used for authentication during the backup.
* Enter the name of the backup file in the *Filename* field. Optionally, select
the *Browser* icon (ellipsis) to the right to navigate into a directory and
select a file that will contain the archive.
* Use the drop-down listbox next to *Role name* to specify a role with
connection privileges on the selected server. The role will be used for
authentication during the backup.
Move switches in the **Miscellaneous** field box to specify the type of statements that should be included in the backup.
Move switches in the **Miscellaneous** field box to specify the type of
statements that should be included in the backup.
* Move the *Verbose messages* switch to the *No* position to exclude status messages from the backup. The default is *Yes*.
* Move the *Force double quote on identifiers* switch to the *Yes* position to name identifiers without changing case. The default is *No*.
* Move the *Verbose messages* switch to the *No* position to exclude status
messages from the backup. The default is *Yes*.
* Move the *Force double quote on identifiers* switch to the *Yes* position to
name identifiers without changing case. The default is *No*.
Click the *Backup* button to build and execute a command based on your selections; click the *Cancel* button to exit without saving work.
Click the *Backup* button to build and execute a command based on your
selections; click the *Cancel* button to exit without saving work.
.. image:: images/backup_globals_messages.png
:alt: Backup globals success notification popup
:align: center
Use the **Stop Process** button to stop the Backup process.
If the backup is successful, a popup window will confirm success. Click *Click here for details* on the popup window to launch the *Process Watcher*. The *Process Watcher* logs all the activity associated with the backup and provides additional information for troubleshooting.
If the backup is successful, a popup window will confirm success. Click *Click
here for details* on the popup window to launch the *Process Watcher*. The
*Process Watcher* logs all the activity associated with the backup and provides
additional information for troubleshooting.
.. image:: images/backup_globals_process_watcher.png
:alt: Backup globals process watcher
:align: center
If the backup is unsuccessful, review the error message returned by the *Process Watcher* to resolve any issue.
If the backup is unsuccessful, review the error message returned by the
*Process Watcher* to resolve any issue.
+78 -28
View File
@@ -4,85 +4,135 @@
`Backup Server Dialog`:index:
*****************************
Use the *Backup Server* dialog to create a plain-text script that will recreate the selected server. You can use the pgAdmin *Query Tool* to play back a plain-text script, and recreate the server.
Use the *Backup Server* dialog to create a plain-text script that will recreate
the selected server. You can use the pgAdmin *Query Tool* to play back a
plain-text script, and recreate the server.
.. image:: images/backup_server_general.png
:alt: Backup server dialog
:align: center
Use the fields in the *General* tab to specify the following:
* Enter the name of the backup file in the *Filename* field. Optionally, select the *Browser* icon (ellipsis) to the right to navigate into a directory and select a file that will contain the archive.
* Use the *Encoding* drop-down listbox to select the character encoding method that should be used for the archive. **Note:** This option is visible only for database server greater than or equal to 11.
* Use the drop-down listbox next to *Role name* to specify a role with connection privileges on the selected server. The role will be used for authentication during the backup.
* Enter the name of the backup file in the *Filename* field. Optionally, select
the *Browser* icon (ellipsis) to the right to navigate into a directory and
select a file that will contain the archive.
* Use the *Encoding* drop-down listbox to select the character encoding method
that should be used for the archive. **Note:** This option is visible only for
database server greater than or equal to 11.
* Use the drop-down listbox next to *Role name* to specify a role with
connection privileges on the selected server. The role will be used for
authentication during the backup.
.. image:: images/backup_server_objects.png
:alt: Type of objects option on backup server dialog
:align: center
* Move switches in the **Type of objects** field box to specify details about the type of objects that will be backed up.
* Move switches in the **Type of objects** field box to specify details about
the type of objects that will be backed up.
* Move the switch next to *Only data* to the *Yes* position to limit the back up to data.
* Move the switch next to *Only data* to the *Yes* position to limit the back
up to data.
* Move the switch next to *Only schema* to limit the back up to schema-level database objects.
* Move the switch next to *Only schema* to limit the back up to schema-level
database objects.
.. image:: images/backup_server_do_not_save.png
:alt: Do not save option on backup server dialog
:align: center
* Move switches in the **Do not save** field box to select the objects that will not be included in the backup.
* Move switches in the **Do not save** field box to select the objects that will
not be included in the backup.
* Move the switch next to *Owner* to the *Yes* position to exclude commands that set object ownership.
* Move the switch next to *Owner* to the *Yes* position to exclude commands
that set object ownership.
* Move the switch next to *Privilege* to the *Yes* position to exclude commands that create access privileges.
* Move the switch next to *Privilege* to the *Yes* position to exclude
commands that create access privileges.
* Move the switch next to *Tablespace* to the *Yes* position to exclude tablespaces.
* Move the switch next to *Tablespace* to the *Yes* position to exclude
tablespaces.
* Move the switch next to *Unlogged table data* to the *Yes* position to exclude the contents of unlogged tables.
* Move the switch next to *Unlogged table data* to the *Yes* position to
exclude the contents of unlogged tables.
* Move the switch next to *Comments* to the *Yes* position to exclude commands that set the comments. **Note:** This option is visible only for database server greater than or equal to 11.
* Move the switch next to *Comments* to the *Yes* position to exclude
commands that set the comments. **Note:** This option is visible only for
database server greater than or equal to 11.
.. image:: images/backup_server_queries.png
:alt: Queries option on backup server dialog
:align: center
* Move switches in the **Queries** field box to specify the type of statements that should be included in the backup.
* Move switches in the **Queries** field box to specify the type of statements
that should be included in the backup.
* Move the switch next to *Use Column Inserts* to the *Yes* position to dump the data in the form of INSERT statements and include explicit column names. Please note: this may make restoration from backup slow.
* Move the switch next to *Use Column Inserts* to the *Yes* position to dump
the data in the form of INSERT statements and include explicit column
names. Please note: this may make restoration from backup slow.
* Move the switch next to *Use Insert commands* to the *Yes* position to dump the data in the form of INSERT statements rather than using a COPY command. Please note: this may make restoration from backup slow.
* Move the switch next to *Use Insert commands* to the *Yes* position to dump
the data in the form of INSERT statements rather than using a COPY command.
Please note: this may make restoration from backup slow.
* Move the switch next to *Include DROP DATABASE statement* to the *Yes* position to include a command in the backup that will drop any existing database object with the same name before recreating the object during a backup.
* Move the switch next to *Include DROP DATABASE statement* to the *Yes*
position to include a command in the backup that will drop any existing
database object with the same name before recreating the object during a
backup.
.. image:: images/backup_server_disable.png
:alt: Disable option on backup server dialog
:align: center
* Move switches in the **Disable** field box to specify the type of statements that should be excluded from the backup.
* Move switches in the **Disable** field box to specify the type of statements
that should be excluded from the backup.
* Move the switch next to *Trigger* (active when creating a data-only backup) to the *Yes* position to include commands that will disable triggers on the target table while the data is being loaded.
* Move the switch next to *Trigger* (active when creating a data-only backup)
to the *Yes* position to include commands that will disable triggers on the
target table while the data is being loaded.
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar quoting within function bodies; if disabled, the function body will be quoted using SQL standard string syntax.
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar
quoting within function bodies; if disabled, the function body will be
quoted using SQL standard string syntax.
.. image:: images/backup_server_miscellaneous.png
:alt: Miscellaneous option on backup server dialog
:align: center
* Move switches in the **Miscellaneous** field box to specify miscellaneous backup options.
* Move switches in the **Miscellaneous** field box to specify miscellaneous
backup options.
* Move the switch next to *With OIDs* to the *Yes* position to include object identifiers as part of the table data for each table.
* Move the switch next to *With OIDs* to the *Yes* position to include object
identifiers as part of the table data for each table.
* Move the switch next to *Verbose messages* to the *No* position to instruct *pg_dump* to exclude verbose messages.
* Move the switch next to *Verbose messages* to the *No* position to instruct
*pg_dump* to exclude verbose messages.
* Move the switch next to *Force double quotes on identifiers* to the *Yes* position to force the quoting of all identifiers.
* Move the switch next to *Force double quotes on identifiers* to the *Yes*
position to force the quoting of all identifiers.
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes* position to include a statement that will use a SET SESSION AUTHORIZATION command to determine object ownership (instead of an ALTER OWNER command).
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes*
position to include a statement that will use a SET SESSION AUTHORIZATION
command to determine object ownership (instead of an ALTER OWNER command).
Click the *Backup* button to build and execute a command based on your selections; click the *Cancel* button to exit without saving work.
Click the *Backup* button to build and execute a command based on your
selections; click the *Cancel* button to exit without saving work.
.. image:: images/backup_server_messages.png
:alt: Backup server success notification popup
:align: center
Use the **Stop Process** button to stop the Backup process.
If the backup is successful, a popup window will confirm success. Click *Click here for details* on the popup window to launch the *Process Watcher*. The *Process Watcher* logs all the activity associated with the backup and provides additional information for troubleshooting.
If the backup is successful, a popup window will confirm success. Click *Click
here for details* on the popup window to launch the *Process Watcher*. The
*Process Watcher* logs all the activity associated with the backup and provides
additional information for troubleshooting.
.. image:: images/backup_server_process_watcher.png
:alt: Backup server process watcher
:align: center
If the backup is unsuccessful, review the error message returned by the *Process Watcher* to resolve any issue.
If the backup is unsuccessful, review the error message returned by the
*Process Watcher* to resolve any issue.
-40
View File
@@ -1,40 +0,0 @@
.. _browser:
*****************************
`The pgAdmin 4 Client`:index:
*****************************
pgAdmin 4 supports all PostgreSQL features, from writing simple SQL queries to developing complex databases. It is designed to query an active database (in real-time), allowing you to stay current with modifications and implementations.
Features of pgAdmin 4 include:
* auto-detection and support for objects discovered at run-time
* a live SQL query tool with direct data editing
* support for administrative queries
* a syntax-highlighting SQL editor
* redesigned graphical interfaces
* powerful management dialogs and tools for common tasks
* responsive, context-sensitive behavior
* supportive error messages
* helpful hints
* online help and information about using pgAdmin dialogs and tools.
When pgAdmin opens, the interface features a menu bar and a window divided into two panes: the *Browser* tree control in the left pane, and a tabbed browser in the right pane.
.. image:: images/pgadmin_welcome.png
:alt: pgAdmin4 welcome page
Select an icon from the *Quick Links* panel on the *Dashboard* tab to:
* Click the *Add New Server* button to open the :ref:`Create - Server dialog <server_dialog>` to add a new server definition.
* Click the *Configure pgAdmin* button to open the :ref:`Preferences dialog <preferences>` to customize your pgAdmin client.
Links in the *Getting Started* panel open a new browser tab that provide useful information for Postgres users:
* Click the *PostgreSQL Documentation* link to navigate to the *Documentation* page for the PostgreSQL open-source project; once at the project site, you can review the manuals for the currently supported versions of the PostgreSQL server.
* Click the *pgAdmin Website* link to navigate to the pgAdmin project website. The pgAdmin site features news about recent pgAdmin releases and other project information.
* Click the *Planet PostgreSQL* link to navigate to the blog aggregator for Postgres related blogs.
* Click the *Community Support* link to navigate to the *Community* page at the PostgreSQL open-source project site; this page provides information about obtaining support for PostgreSQL features.
+24 -24
View File
@@ -1,20 +1,16 @@
import os
import sys
import inspect
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins
import builtins
# Ensure the global server mode is set.
builtins.SERVER_MODE = None
root = os.path.realpath(
os.path.dirname(
os.path.realpath(__file__)
) + '{0}..{0}..{0}web'.format(os.sep)
)
os.path.dirname(
os.path.realpath(__file__)
) + '{0}..{0}..{0}web'.format(os.sep)
)
if sys.path[0] != root:
sys.path.insert(0, root)
@@ -32,18 +28,19 @@ This document contains code for some of the important classes, listed as
below:\n\n""")
for m in [
'PgAdminModule', 'NodeView',
'BaseDriver', 'BaseConnection'
]:
'PgAdminModule', 'NodeView',
'BaseDriver', 'BaseConnection'
]:
target.write("* {0}_\n".format(m))
def print_code(outstream, name, module, info=None):
l = len(name)
name_len = len(name)
outstream.write("\n\n.. _{0}:\n\n{0}\n".format(name))
idx = 0
while idx < l:
while idx < name_len:
idx += 1
outstream.write("*")
@@ -60,21 +57,24 @@ def print_code(outstream, name, module, info=None):
print_code(
target, "PgAdminModule", PgAdminModule,
"""
PgAdminModule is inherted from Flask.Blueprint module.
This module defines a set of methods, properties and attributes, that every module should implement.
target, "PgAdminModule", PgAdminModule,
"""
PgAdminModule is inherited from Flask.Blueprint module.
This module defines a set of methods, properties and attributes,
that every module should implement.
""")
from pgadmin.browser.utils import NodeView
print_code(
target, "NodeView", NodeView,
"""
NodeView class helps exposing basic REST APIs for different operations used by
pgAdmin Browser. The basic idea has been taken from the `Flask's MethodView
<http://flask.pocoo.org/docs/0.10/api/#flask.views.MethodView>`_ class. Because
- we need a lot more operations (not, just CRUD), we can not use it directly.""")
target, "NodeView", NodeView,
"""
The NodeView class exposes basic REST APIs for different operations used by
the pgAdmin Browser. The basic idea has been taken from `Flask's MethodView
<http://flask.pocoo.org/docs/1.0/api/#flask.views.MethodView>`_ class. Because
we need a lot more operations (not, just CRUD), we can not use it directly.""")
from pgadmin.utils.driver.abstract import BaseDriver, BaseConnection
print_code(target, "BaseDriver", BaseDriver)
print_code(target, "BaseConnection", BaseConnection)
+31 -11
View File
@@ -4,44 +4,64 @@
`Cast Dialog`:index:
********************
Use the *Cast* dialog to define a cast. A cast specifies how to convert a value from one data type to another.
Use the *Cast* dialog to define a cast. A cast specifies how to convert a value
from one data type to another.
The *Cast* dialog organizes the development of a cast through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Cast* dialog organizes the development of a cast through the following
dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code
generated by dialog selections.
.. image:: images/cast_general.png
:alt: Cast dialog general tab
:align: center
Use the fields in the *General* tab to identify the cast:
* The *Name* field is disabled. The name that will be displayed in the *pgAdmin* tree control is the *Source* type concatenated with the *Target* type, and is generated automatically when you make selections on the *Cast* dialog *Definition* tab.
* The *Name* field is disabled. The name that will be displayed in the
*pgAdmin* tree control is the *Source* type concatenated with the *Target*
type, and is generated automatically when you make selections on the *Cast*
dialog *Definition* tab.
* Store notes about the cast in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/cast_definition.png
:alt: Cast dialog definition tab
:align: center
Use the fields in the *Definition* tab to define parameters:
* Use the drop-down listbox next to *Source type* to select the name of the source data type of the cast.
* Use the drop-down listbox next to *Target type* to select the name of the target data type of the cast.
* Use the drop-down listbox next to *Function* to select the function used to perform the cast. The function's result data type must match the target type of the cast.
* Move the *Context* switch to the *Implicit* position if the cast is implicit. By default, a cast can be invoked only by an explicit cast request. If the cast is marked *Implicit* then it can be invoked implicitly in any context, whether by assignment or internally in an expression.
* Use the drop-down listbox next to *Source type* to select the name of the
source data type of the cast.
* Use the drop-down listbox next to *Target type* to select the name of the
target data type of the cast.
* Use the drop-down listbox next to *Function* to select the function used to
perform the cast. The function's result data type must match the target type
of the cast.
* Move the *Context* switch to the *Implicit* position if the cast is implicit.
By default, a cast can be invoked only by an explicit cast request. If the
cast is marked *Implicit* then it can be invoked implicitly in any context,
whether by assignment or internally in an expression.
Click the *SQL* tab to continue.
Your entries in the *Cast* 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.
Your entries in the *Cast* 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 *Cast* dialog:
The following is an example of the sql command generated by user selections in
the *Cast* dialog:
.. image:: images/cast_sql.png
:alt: Cast dialog sql tab
:align: center
The cast uses a function named *int4(bigint)* to convert a biginteger data type to an integer.
The cast uses a function named *int4(bigint)* to convert a biginteger data type
to an integer.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+20 -7
View File
@@ -4,24 +4,37 @@
`Change Password Dialog`:index:
*******************************
It is a good policy to routinely change your password to protect data, even in what you may consider a 'safe' environment. In the workplace, failure to apply an appropriate password policy could leave you in breach of Data Protection laws.
It is a good policy to routinely change your password to protect data, even in
what you may consider a 'safe' environment. In the workplace, failure to apply
an appropriate password policy could leave you in breach of Data Protection
laws.
Please consider the following guidelines when selecting a password:
* Ensure that your password is an adequate length; 6 characters should be the absolute minimum number of characters in the password.
* Ensure that your password is not open to dictionary attacks. Use a mixture of upper and lower case letters and numerics, and avoid words or names. Consider using the first letter from each word in a phrase that you will remember easily but is an unfamiliar acronym.
* Ensure that your password is changed regularly; at minimum, change it every ninety days.
* Ensure that your password is an adequate length; 6 characters should be the
absolute minimum number of characters in the password.
* Ensure that your password is not open to dictionary attacks. Use a mixture of
upper and lower case letters and numerics, and avoid words or names. Consider
using the first letter from each word in a phrase that you will remember
easily but is an unfamiliar acronym.
* Ensure that your password is changed regularly; at minimum, change it every
ninety days.
The above should be considered a starting point: It is not a comprehensive list and it **will not guarantee security**.
The guidelines above should be considered a starting point: They are not a
comprehensive list and they **will not guarantee security**.
.. image:: images/password.png
:alt: Change database password dialog
:align: center
Use the *Change Password* dialog to change your password:
* The name displayed in the *User* field is the role for which you are modifying the password; it is the role that is associated with the server connection that is highlighted in the tree control.
* The name displayed in the *User* field is the role for which you are modifying
the password; it is the role that is associated with the server connection
that is highlighted in the tree control.
* Enter the password associated with the role in the *Current Password* field.
* Enter the desired password for in the *New Password* field.
* Re-enter the new password in the *Confirm Password* field.
Click the *OK* button to change your password; click *Cancel* to exit the dialog without changing your password.
Click the *OK* button to change your password; click *Cancel* to exit the dialog
without changing your password.
+17 -6
View File
@@ -4,18 +4,28 @@
`Change User Password Dialog`:index:
************************************
It is a good policy to routinely change your password to protect data, even in what you may consider a 'safe' environment. In the workplace, failure to apply an appropriate password policy could leave you in breach of Data Protection laws.
It is a good policy to routinely change your password to protect data, even in
what you may consider a 'safe' environment. In the workplace, failure to apply
an appropriate password policy could leave you in breach of Data Protection
laws.
Please consider the following guidelines when selecting a password:
* Ensure that your password is an adequate length; 6 characters should be the absolute minimum number of characters in the password.
* Ensure that your password is not open to dictionary attacks. Use a mixture of upper and lower case letters and numerics, and avoid words or names. Consider using the first letter from each word in a phrase that you will remember easily but is an unfamiliar acronym.
* Ensure that your password is changed regularly; at minimum, change it every ninety days.
* Ensure that your password is an adequate length; 6 characters should be the
absolute minimum number of characters in the password.
* Ensure that your password is not open to dictionary attacks. Use a mixture of
upper and lower case letters and numerics, and avoid words or names. Consider
using the first letter from each word in a phrase that you will remember
easily but is an unfamiliar acronym.
* Ensure that your password is changed regularly; at minimum, change it every
ninety days.
The above should be considered a starting point: It is not a comprehensive list and it **will not guarantee security**.
The guidelines above should be considered a starting point: They are not a
comprehensive list and they **will not guarantee security**.
.. image:: images/change_user_password.png
:alt: Change current user password dialog
:align: center
Use the *Change Password* dialog to change your password:
@@ -23,4 +33,5 @@ Use the *Change Password* dialog to change your password:
* Enter the desired password for in the *New Password* field.
* Re-enter the new password in the *Confirm Password* field.
Click the *Change Password* button to change your password; click *Close* to exit the dialog.
Click the *Change Password* button to change your password; click *Close* to
exit the dialog.
+28 -9
View File
@@ -4,44 +4,63 @@
`Check Dialog`:index:
*********************
Use the *Check* dialog to define or modify a check constraint. A check constraint specifies an expression that produces a Boolean result that new or updated rows must satisfy for an insert or update operation to succeed.
Use the *Check* dialog to define or modify a check constraint. A check
constraint specifies an expression that produces a Boolean result that new or
updated rows must satisfy for an insert or update operation to succeed.
The *Check* dialog organizes the development of a check constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections.
The *Check* dialog organizes the development of a check constraint through the
*General* and *Definition* tabs. The *SQL* tab displays the SQL code generated
by dialog selections.
.. image:: images/check_general.png
:alt: Check dialog general tab
:align: center
Use the fields in the *General* tab to identify the check constraint:
* Use the *Name* field to provide a descriptive name for the check constraint that will be displayed in the *pgAdmin* tree control. With PostgreSQL 9.5 forward, when a table has multiple check constraints, they will be tested for each row in alphabetical order by name and after NOT NULL constraints.
* Use the *Name* field to provide a descriptive name for the check constraint
that will be displayed in the *pgAdmin* tree control. With PostgreSQL 9.5
forward, when a table has multiple check constraints, they will be tested for
each row in alphabetical order by name and after NOT NULL constraints.
* Store notes about the check constraint in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/check_definition.png
:alt: Check dialog definition tab
:align: center
Use the fields in the *Definition* tab to define the check constraint:
* Provide the expression that a row must satisfy in the *Check* field.
* Move the *No Inherit?* switch to the *Yes* position to specify this constraint is automatically inherited by a table's children. The default is *No*.
* Move the *Don't validate?* switch to the *No* position to skip validation of existing data; the constraint may not hold for all rows in the table. The default is *Yes*.
* Move the *No Inherit?* switch to the *Yes* position to specify that this
constraint is not automatically inherited by a table's children. The default
is *No*, meaning that the constraint will be inherited by any children.
* Move the *Don't validate?* switch to the *No* position to skip validation of
existing data; the constraint may not hold for all rows in the table. The
default is *Yes*.
Click the *SQL* tab to continue.
Your entries in the *Check* 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.
Your entries in the *Check* 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 *Check* dialog:
The following is an example of the sql command generated by user selections in
the *Check* dialog:
.. image:: images/check_sql.png
:alt: Check dialog sql tab
:align: center
The example shown demonstrates creating a check constraint named *check_price* on the *price* column of the *products* table. The constraint confirms that any values added to the column are greater than 0.
The example shown demonstrates creating a check constraint named *check_price*
on the *price* column of the *products* table. The constraint confirms that
any values added to the column are greater than 0.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+12 -5
View File
@@ -4,16 +4,23 @@
`Clear Saved Passwords`:index:
******************************
Use *Clear Saved Password* functionality to clear the saved password for the database server.
Use *Clear Saved Password* functionality to clear the saved password for the
database server.
.. image:: images/clear_saved_password.png
:align: center
*Clear Saved Password* shows in the context menu for the selected server as well as under the *Object* menu on the top menu bar.
*Clear Saved Password* shows in the context menu for the selected server as well
as under the *Object* menu on the top menu bar.
Use *Clear SSH Tunnel Password* functionality to clear the saved password of SSH Tunnel to connect to the database server.
Use *Clear SSH Tunnel Password* functionality to clear the saved password of SSH
Tunnel to connect to the database server.
.. image:: images/clear_tunnel_password.png
:align: center
*Clear SSH Tunnel Password* shows in the context menu for the selected server as well as under the *Object* menu on the top menu bar.
*Clear SSH Tunnel Password* shows in the context menu for the selected server as
well as under the *Object* menu on the top menu bar.
**Note:** It will be enabled/visible when the password for the selected database server is already saved.
**Note:** It will be enabled/visible when the password for the selected database
server is already saved.
+14 -13
View File
@@ -10,14 +10,14 @@ desktop runtime is also included for users that prefer a desktop application to
a web application, which is written in C++ using the QT framework.
Runtime
=======
*******
The runtime is essentially a Python webserver and browser in a box. Found in the
**/runtime** directory in the source tree, it is a relatively simple QT
application that is most easily modified using the **QT Creator** application.
Web Application
===============
***************
The web application forms the bulk of pgAdmin and can be found in the **/web**
directory in the source tree. The main file is **pgAdmin4.py** which can be used
@@ -25,16 +25,17 @@ to run the built-in standalone web server, or as a WSGI application for producti
use.
Configuration
-------------
=============
The core application configuration is found in **config.py**. This file includes
all configurable settings for the application, along with descriptions of their
use. It is essential that various settings are configured prior to deployent on
a web server; these can be overriden in **config_local.py** to avoid modifying
the main configuration file.
use. It is essential that various settings are configured prior to deployment on
a web server; these can be overridden in **config_local.py** or
**config_system.py** (see the :ref:`config.py <config_py>` documentation) to
avoid modifying the main configuration file.
User Settings
-------------
=============
When running in desktop mode, pgAdmin has a single, default user account that is
used for the desktop user. When running in server mode, there may be unlimited
@@ -57,7 +58,7 @@ The local configuration will determine how the script sets up the database,
particularly with regard to desktop vs. server mode.
pgAdmin Core
============
************
The heart of pgAdmin is the **pgadmin** package. This contains the globally
available HTML templates used by the Jinja engine, as well as any global static
@@ -68,7 +69,7 @@ is responsible for setting up logging and authentication, dynamically loading
other modules, and a few other tasks.
Modules
=======
*******
Units of functionality are added to pgAdmin through the addition of modules.
Theses are Python object instance of classes, inherits the
@@ -108,7 +109,7 @@ PgAdminModule class. This is responsible for providing hook points to integrate
the module into the rest of the application - for example, a hook might tell
the caller what CSS files need to be included on the rendered page, or what menu
options to include and what they should do. Hook points need not exist if they
are not required. It is the responsiblity of the caller to ensure they are
are not required. It is the responsibility of the caller to ensure they are
present before attempting to utilise them.
Hooks currently implemented are:
@@ -190,7 +191,7 @@ loaded modules, but must use the defined hook points and fail gracefully in the
event that a particular module is not present.
Nodes
=====
*****
Nodes are very similar to modules, it represents an individual node or,
collection object on the browser treeview. To recognised as a node module, a
@@ -202,7 +203,7 @@ Python package (along with javascript modules) must be created. This must:
3) An instance of the class object
Front End
=========
*********
pgAdmin uses javascript extensively for the front-end implementation. It uses
require.js to allow the lazy loading (or, say load only when required),
@@ -210,6 +211,6 @@ bootstrap for UI look and feel, Backbone for data manipulation of a node,
Backform for generating properties/create dialog for selected node. We have
divided each module in small chunks as much as possible. Not all javascript
modules are required to be loaded (i.e. loading a javascript module for
database will make sense only when a server node is loaded competely.) Please
database will make sense only when a server node is loaded completely.) Please
look at the the javascript files node.js, browser.js, menu.js, panel.js, etc for
better understanding of the code.
+1 -1
View File
@@ -16,7 +16,7 @@ review process for any patches submitted for inclusion in pgAdmin.
bulk updates every year). The start date should always be 2013, and the end year
the current year, e.g.
Copyright (C) 2013 - 2019, The pgAdmin Development Team
Copyright (C) 2013 - 2020, The pgAdmin Development Team
* Ensure there's a blank line immediately following any copyright headers.
+7 -7
View File
@@ -8,7 +8,7 @@ pgAdmin uses multiple technologies and multiple languages, each of which have
their own coding standards.
General
=======
*******
In all languages, indentations should be made with 4 spaces, and excessively long
lines wrapped where appropriate to ensure they can be read on smaller displays
@@ -20,7 +20,7 @@ Comments should be included in all code where required to explain its
purpose or how it works if not obvious from a quick review of the code itself.
CSS 3
=====
*****
CSS3 is used for styling and layout throughout the application. Extensive use is
made of the Bootstrap Framework to aid in that process, however additional
@@ -54,7 +54,7 @@ Styles should be specified clearly, one per line. For example:
All stylesheets must be CSS3 compliant.
HTML 5
======
******
HTML 5 is used for page structure throughout the application, in most cases
being rendered from templates by the Jinja2 template engine in Flask.
@@ -62,7 +62,7 @@ being rendered from templates by the Jinja2 template engine in Flask.
All HTML must be HTML 5 compliant.
Javascript
==========
**********
Client-side code is written in Javascript using jQuery and various plugins.
Whilst much of the code is rendered from static files, there is also code that
@@ -110,7 +110,7 @@ names.
ES6 features and conventions.
C++
---
***
C++ code is used in the desktop runtime for the application, primarily with the
QT framework and an embedded Python interpreter. Note the use of hanging braces,
@@ -158,7 +158,7 @@ which may be omitted if on a single statement is present:
}
Python
======
******
Python is used for the backend web server. All code must be compatible with
Python 2.7 and should include PyDoc comments whilst following the official
@@ -170,7 +170,7 @@ with the required file header is shown below::
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2019, The pgAdmin Development Team
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
+45 -15
View File
@@ -4,49 +4,79 @@
`Collation Dialog`:index:
*************************
Use the *Collation* dialog to define a collation. A collation is an SQL schema object that maps a SQL name to operating system locales. To create a collation, you must have a CREATE privilege on the destination schema.
Use the *Collation* dialog to define a collation. A collation is an SQL schema
object that maps a SQL name to operating system locales. To create a collation,
you must have a CREATE privilege on the destination schema.
The *Collation* dialog organizes the development of a collation through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Collation* dialog organizes the development of a collation through the
following dialog tabs: *General* and *Definition*. The *SQL* tab displays the
SQL code generated by dialog selections.
.. image:: images/collation_general.png
:alt: Collation dialog general tab
:align: center
Use the fields in the *General* tab to identify the collation:
* Use the *Name* field to provide a name for the collation. The collation name must be unique within a schema. The name will be displayed in the *pgAdmin* tree control.
* Use the *Name* field to provide a name for the collation. The collation name
must be unique within a schema. The name will be displayed in the *pgAdmin*
tree control.
* Select the name of the owner from the drop-down listbox in the *Owner* field.
* Select the name of the schema in which the collation will reside from the drop-down listbox in the *Schema* field.
* 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 collation in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/collation_definition.png
:alt: Collation dialog definition tab
:align: center
Use the fields in the *Definition* tab to specify the operating system locale settings:
Use the fields in the *Definition* tab to specify the operating system locale
settings:
* Use the drop-down listbox next to *Copy collation* to select the name of an existing collation to copy. The new collation will have the same properties as the existing one, but will be an independent object. If you choose to copy an existing collation, you cannot modify the collation properties displayed on this tab.
* Use the *Locale* field to specify a locale; a locale specifies language and language formatting characteristics. If you specify this, you cannot specify either of the following parameters. To view a list of locales supported by your Linux system use the command *locale -a*.
* Use the *LC_COLLATE* field to specify a locale with specified string sort order. The locale must be applicable to the current database encoding. (See CREATE DATABASE for details.)
* Use the *LC_CTYPE* field to specify a locale with specified character classification. The locale must be applicable to the current database encoding. (See CREATE DATABASE for details.)
* Use the drop-down listbox next to *Copy collation* to select the name of an
existing collation to copy. The new collation will have the same properties
as the existing one, but will be an independent object. If you choose to copy
an existing collation, you cannot modify the collation properties displayed on
this tab.
* Use the *Locale* field to specify a locale; a locale specifies language and
language formatting characteristics. If you specify this, you cannot specify
either of the following parameters. To view a list of locales supported by
your Linux system use the command *locale -a*.
* Use the *LC_COLLATE* field to specify a locale with specified string sort
order. The locale must be applicable to the current database encoding. (See
CREATE DATABASE for details.)
* Use the *LC_CTYPE* field to specify a locale with specified character
classification. The locale must be applicable to the current database encoding.
(See CREATE DATABASE for details.)
Click the *SQL* tab to continue.
Your entries in the *Collation* 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.
Your entries in the *Collation* dialog generate a SQL command (see an example b
elow). Use the *SQL* tab for review; revisit or switch tabs to make any changes
to the SQL command.
**Example**
Example
*******
The following is an example of the sql command generated by user selections in the *Collation* dialog:
The following is an example of the sql command generated by user selections in
the *Collation* dialog:
.. image:: images/collation_sql.png
:alt: Collation dialog sql tab
:align: center
The example shown demonstrates creating a collation named *french* that uses the rules specified for the locale, *fr-BI-x-icu. The collation is owned by *postgres*.
The example shown demonstrates creating a collation named *french* that uses the
rules specified for the locale, *fr-BI-x-icu. The collation is owned by
*postgres*.
* 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. For more information about setting a locale, see Chapter 22.1 Locale Support of the PostgreSQL core documentation:
* Click the *Info* button (i) to access online help. For more information about
setting a locale, see Chapter 22.1 Locale Support of the PostgreSQL core
documentation:
http://www.postgresql.org/docs/9.5/static/locale.html
https://www.postgresql.org/docs/current/locale.html
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
+117 -21
View File
@@ -4,73 +4,169 @@
`Column Dialog`:index:
**********************
Use the *Column* dialog to add a column to an existing table or modify a column definition.
Use the *Column* dialog to add a column to an existing table or modify a column
definition.
The *Column* dialog organizes the development of a column through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Column* dialog organizes the development of a column through the following
dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the
SQL code generated by dialog selections.
.. image:: images/column_general.png
:alt: Column dialog general tab
:align: center
Use the fields in the *General* tab to identify the column:
* Use the *Name* field to add a descriptive name for the column. The name will be displayed in the *pgAdmin* tree control. This field is required.
* Use the *Name* field to add a descriptive name for the column. The name will
be displayed in the *pgAdmin* tree control. This field is required.
* Store notes about the column in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/column_definition.png
:alt: Column dialog definition tab
:align: center
Use the fields in the *Definition* tab to add parameters for the column. (Fields are disabled if inapplicable.)
Use the fields in the *Definition* tab to add parameters for the column. (Fields
are disabled if inapplicable.)
* Use the drop-down listbox next to *Data Type* to select a data type for the
column. For more information on the data types that are supported by
PostgreSQL, refer to Chapter 8 of the Postgres core documentation. This field
is required.
* Use the *Length/Precision* and *Scale* fields to specify the maximum number of
significant digits in a numeric value, or the maximum number of characters in
a text value.
* Use the drop-down listbox next to *Collation* to apply a collation setting to
the column.
Click the *Constraints* tab to continue.
.. image:: images/column_constraints.png
:alt: Column dialog constraints tab
:align: center
Use the fields in the *Constraints* tab to specify constraints for the column.
(Fields are disabled if inapplicable.)
* Use the drop-down listbox next to *Data Type* to select a data type for the column. For more information on the data types that are supported by PostgreSQL, refer to Chapter 8 of the Postgres core documentation. This field is required.
* Use the *Length* and *Precision* fields to specify the maximum number of significant digits in a numeric value, or the maximum number of characters in a text value.
* Use the drop-down listbox next to *Collation* to apply a collation setting to the column.
* Use the *Default Value* field to specify a default data value.
* Move the *Not Null* switch to the *Yes* position to specify the column may not contain null values. The default is *No*.
* Move the *Not Null* switch to the *Yes* position to specify the column may not
contain null values. The default is *No*.
* Use the *Type* field to specify the column type (NONE/IDENTITY/GENERATED).
The default is *NONE*.
Click the *IDENTITY* type to create Identity column.
.. image:: images/column_constraint_identity.png
:alt: Column dialog constraints tab
:align: center
Use the following fields to create *IDENTITY* column. Identity columns are
applicable for PG/EPAS version 10 and above.
* Use the *Identity* field to specify ALWAYS or BY DEFAULT. This clause is
used to determine how the sequence value is given precedence over a
user-specified value in an INSERT statement.
* Use the *Increment* field to specify which value is added to the current
sequence value to create a new value.
* Provide a value in the *Start* field to specify the beginning value of the
sequence. The default starting value is MINVALUE for ascending sequences and
MAXVALUE for descending ones.
* Provide a value in the *Minimum* field to specify the minimum value a sequence
can generate. If this clause is not supplied or NO MINVALUE is specified,
then defaults will be used. The defaults are 1 and -263-1 for ascending and
descending sequences, respectively.
* Provide a value in the *Maximum* field to specify the maximum value for the
sequence. If this clause is not supplied or NO MAXVALUE is specified, then
default values will be used. The defaults are 263-1 and -1 for ascending and
descending sequences, respectively.
* Provide a value in the *Cache* field to specify how many sequence numbers are
to be preallocated and stored in memory for faster access. The minimum value
is 1 (only one value can be generated at a time, i.e., no cache), and this is
also the default.
* Move the *Cycled* switch to the *Yes* position to allow the sequence to wrap
around when the MAXVALUE or the MINVALUE has been reached by an ascending or
descending sequence respectively. If the limit is reached, the next number
generated will be the MINVALUE or MAXVALUE, respectively. The default is *No*.
Click the *GENERATED* type to create Generated column.
.. image:: images/column_constraint_generated.png
:alt: Column dialog constraints tab
:align: center
Use the following fields to create *GENERATED* column. Generated columns are
applicable for PG/EPAS version 12 and above.
* Use the *Expression* field to specify the generation expression. It can
refer to other columns in the table, but not other generated columns.
Any functions and operators used must be immutable. References to other
tables are not allowed.
Click the *Variables* tab to continue.
.. image:: images/column_variables.png
:alt: Column dialog variables tab
:align: center
Use the *Variables* tab to to specify the number of distinct values that may be present in the column; this value overrides estimates made by the ANALYZE command. Click the *Add* icon (+) to add a *Name*/*Value* pair:
Use the *Variables* tab to to specify the number of distinct values that may be
present in the column; this value overrides estimates made by the ANALYZE
command. Click the *Add* icon (+) to add a *Name*/*Value* pair:
* Select the name of the variable from the drop-down listbox in the *Name* field.
* Select *n_distinct* to specify the number of distinct values for the column.
* Select *n_distinct_inherited* to specify the number of distinct values for the table and its children.
* Select *n_distinct_inherited* to specify the number of distinct values
for the table and its children.
* Specify the number of distinct values in the *Value* field. For more information, see the documentation for `ALTER TABLE <http://www.postgresql.org/docs/9.6/static/sql_altertable.html>`_.
* Specify the number of distinct values in the *Value* field. For more
information, see the documentation for
`ALTER TABLE <https://www.postgresql.org/docs/current/sql-altertable.html>`_.
Click the *Add* icon (+) to specify each additional *Name*/*Value* pair; to discard a variable, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Click the *Add* icon (+) to specify each additional *Name*/*Value* pair; to
discard a variable, 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/column_security.png
:alt: Column dialog security tab
:align: center
Use the *Security* tab to assign attributes and define security labels. Click the *Add* icon (+) to add each security label selection:
Use the *Security* tab to assign attributes and define security labels. Click
the *Add* icon (+) 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.
* 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 the *Add* icon (+) 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 *Add* icon (+) 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 *Column* 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.
Your entries in the *Column* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Column* dialog:
The following is an example of the sql command generated by user selections in
the *Column* dialog:
.. image:: images/column_sql.png
:alt: Column dialog sql tab
:align: center
The example shown demonstrates creating a column named *territory* in the table named *distributors*.
The example shown demonstrates creating a column named *territory* in the table
named *distributors*.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+83
View File
@@ -0,0 +1,83 @@
.. _compound_trigger_dialog:
********************************
`Compound Trigger Dialog`:index:
********************************
Use the *Compound Trigger* dialog to create a compound trigger or modify an
existing compound trigger. *Compound Trigger* is supported only for EPAS server
12 and above. A compound trigger executes a specified code when certain events
occur.
The *Compound Trigger* dialog organizes the development of a compound trigger
through the following dialog tabs: *General*, *Events*, and *Code*. The *SQL*
tab displays the SQL code generated by dialog selections.
.. image:: images/compound_trigger_general.png
:alt: Compound Trigger dialog general tab
:align: center
Use the fields in the *General* tab to identify the compound trigger:
* Use the *Name* field to add a descriptive name for the compound trigger. This
must be distinct from the name of any other compound trigger for the same table.
The name will be displayed in the *pgAdmin* tree control.
* Store notes about the compound trigger in the *Comment* field.
.. image:: images/compound_trigger_general_enabled.png
:alt: Trigger enabled in dialog tab
:align: center
* *Trigger enabled* field is available in compound trigger dialog once the trigger is created.
You can select one of the four options available.
Click the *Events* tab to continue.
.. image:: images/compound_trigger_events.png
:alt: Compound Trigger dialog events tab
:align: center
Use the fields in the *Events* tab to specify how and when the compound trigger fires:
* Select the type of event(s) that will invoke the compound trigger; to select
an event type, move the switch next to the event to the *YES* position.
The supported event types are *INSERT*, *UPDATE*, *DELETE* and *TRUNCATE*.
Views cannot have TRUNCATE triggers.
* Use the *When* field to provide a boolean condition that will invoke the
compound trigger.
* If defining a column-specific compound trigger, use the *Columns* field to
specify the columns or columns that are the target of the compound trigger.
Click the *Code* tab to continue.
.. image:: images/compound_trigger_code.png
:alt: Compound Trigger dialog code tab
:align: center
Use the *Code* field to specify the code for the five timing events
*BEFORE STATEMENT*, *AFTER STATEMENT*, *BEFORE EACH ROW*, *AFTER EACH ROW*,
*INSTEAD OF EACH ROW* that will be invoked when the compound trigger fires.
Basic template is provided with place holders.
Click the *SQL* tab to continue.
Your entries in the *Compound Trigger* 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 *Compound Trigger* dialog:
.. image:: images/compound_trigger_sql.png
:alt: Compound Trigger dialog sql tab
:align: center
The example demonstrates creating a compound trigger named *test_ct*.
* Click the *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+79 -73
View File
@@ -3,7 +3,8 @@
# pgAdmin III documentation build configuration file, created by
# sphinx-quickstart on Sat Jul 9 15:58:11 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its containing
# directory.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
@@ -11,12 +12,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins
import os
import sys
import builtins
# Ensure the global server mode is set.
builtins.SERVER_MODE = None
@@ -29,15 +27,15 @@ import config
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# -- General configuration ----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
@@ -47,7 +45,7 @@ templates_path = ['_templates']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
@@ -67,82 +65,83 @@ release = config.APP_VERSION
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'classic'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
'collapsiblesidebar': True,
'relbarbgcolor': '#326690',
'sidebarbgcolor': '#E2E2E2',
'sidebarbtncolor': '#326690',
'sidebartextcolor': '#222222',
'sidebarlinkcolor': '#326690',
'footerbgcolor': '#222222',
'codebgcolor': '#d6effc',
'textcolor': '#222222',
'headbgcolor': '#E2E2E2',
'headtextcolor': '#326690',
'bodyfont': '"Helvetica Neue", Helvetica, Arial, sans-serif',
'headfont': '"Helvetica Neue", Helvetica, Arial, sans-serif'
}
html_theme = 'pgadmin4'
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['./theme'] # make sphinx search for themes in current dir
# html_theme_options = {
# 'collapsiblesidebar': True,
# 'relbarbgcolor': '#326690',
# 'sidebarbgcolor': '#E2E2E2',
# 'sidebarbtncolor': '#326690',
# 'sidebartextcolor': '#222222',
# 'sidebarlinkcolor': '#326690',
# 'footerbgcolor': '#222222',
# 'codebgcolor': '#d6effc',
# 'textcolor': '#222222',
# 'headbgcolor': '#E2E2E2',
# 'headtextcolor': '#326690',
# 'bodyfont': '"Helvetica Neue", Helvetica, Arial, sans-serif',
# 'headfont': '"Helvetica Neue", Helvetica, Arial, sans-serif'
# }
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -151,30 +150,30 @@ html_static_path = ['images']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}
html_sidebars = {
'**': ['localtoc.html', 'globaltoc.html', 'searchbox.html']
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
@@ -188,59 +187,66 @@ html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'pgadmin4'
# -- Options for LaTeX output --------------------------------------------------
# -- Options for LaTeX output -------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'pgadmin4.tex', u'pgAdmin 4 Documentation',
u'The pgAdmin Development Team', 'manual'),
('index', 'pgadmin4.tex', 'pgAdmin 4 Documentation',
'The pgAdmin Development Team', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True
# Fix the indexing for our docs. See:
# https://groups.google.com/forum/#!topic/sphinx-users/ZlQ95_QikXo
latex_elements = {
'fncychap': r'\usepackage[Sonny]{fncychap}',
}
# -- Options for manual page output --------------------------------------------
# -- Options for manual page output -------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'pgadmin4', u'pgAdmin 4 Documentation',
[u'The pgAdmin Development Team'], 1)
('index', 'pgadmin4', 'pgAdmin 4 Documentation',
['The pgAdmin Development Team'], 1)
]
+45
View File
@@ -0,0 +1,45 @@
.. _config_py:
***************************
`The config.py File`:index:
***************************
There are multiple configuration files that are read at startup by pgAdmin. These
are as follows:
* ``config.py``: This is the main configuration file, and should not be modified.
It can be used as a reference for configuration settings, that may be overridden
in one of the following files.
* ``config_distro.py``: This file is read after ``config.py`` and is intended for
packagers to change any settings that are required for their pgAdmin distribution.
This may typically include certain paths and file locations. This file is optional,
and may be created by packagers in the same directory as ``config.py`` if
needed.
* ``config_local.py``: This file is read after ``config_distro.py`` and is intended
for end users to change any default or packaging specific settings that they may
wish to adjust to meet local preferences or standards.This file is optional,
and may be created by users in the same directory as ``config.py`` if
needed.
* ``config_system.py``: This file is read after ``config_local.py`` and is
intended for system administrators to include settings that are configured
system-wide from a secure location that users cannot normally modify and that
is outside of the pgAdmin installation. The location for this file varies
based on the platform, and only needs to be created if desired:
* Linux: ``/etc/pgadmin/config_system.py``
* macOS: ``/Library/Preferences/pgadmin/config_system.py``
* Windows: ``%CommonProgramFiles%\pgadmin\config_system.py``
.. note:: If the SERVER_MODE setting is changed in ``config_distro.py``,
``config_local.py``, or ``config_system.py`` you will most likely need to
re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH and STORAGE_DIR values
as well as they will have been set based on the default configuration or
overridden by the runtime.
The default ``config.py`` file is shown below for reference:
.. literalinclude:: ../../web/config.py
:language: python
+34 -9
View File
@@ -1,51 +1,76 @@
.. _connect_error:
*************************
`Connection error`:index:
`Connection Error`:index:
*************************
When connecting to a PostgreSQL server, you may get an error message. If you encounter an error message, please review the message carefully; each error message attempts to incorporate the information you'll need to resolve the problem. For more details about specific errors, please locate the error message in the list below:
When connecting to a PostgreSQL server, you may get an error message. If you
encounter an error message, please review the message carefully; each error
message attempts to incorporate the information you'll need to resolve the
problem. For more details about specific errors, please locate the error
message in the list below:
**Connection to the server has been lost**
.. image:: images/ce_timeout.png
:alt: Connection to the server has been lost
:align: center
This error message indicates that the connection attempt has taken longer than the specified threshold; there may be a problem with the connection properties provided on the *Server* dialog, network connectivity issues, or the server may not be running.
This error message indicates that the connection attempt has taken longer than
the specified threshold; there may be a problem with the connection properties
provided on the *Server* dialog, network connectivity issues, or the server may
not be running.
**could not connect to Server: Connection refused**
.. image:: images/ce_not_running.png
:alt: Could not connect to server
:align: center
If pgAdmin displays this message, there are two possible reasons for this:
* the database server isn't running - simply start it.
* the server isn't configured to accept TCP/IP requests on the address shown.
For security reasons, a PostgreSQL server "out of the box" doesn't listen on TCP/IP ports. Instead, it must be enabled to listen for TCP/IP requests. This can be done by adding **tcpip = true** to the postgresql.conf file for Versions 7.3.x and 7.4.x, or **listen_addresses='*'** for Version 8.0.x and above; this will make the server accept connections on any IP interface.
For security reasons, a PostgreSQL server "out of the box" doesn't listen on
TCP/IP ports. Instead, it must be enabled to listen for TCP/IP requests. This
can be done by adding **listen_addresses='*'**; this will make the server accept
connections on any IP interface.
For further information, please refer to the PostgreSQL documentation about `runtime configuration <http://www.postgresql.org/docs/current/interactive/runtime-config.html>`_.
For further information, please refer to the PostgreSQL documentation about
`runtime configuration <https://www.postgresql.org/docs/current/runtime-config.html>`_.
**FATAL: no pg_hba.conf entry**
.. image:: images/ce_error_hba.png
:alt: No pg_hba.conf entry
:align: center
If pgAdmin displays this message when connecting, your server can be contacted correctly over the network, but is not configured to accept your connection. Your client has not been detected as a legal user for the database.
If pgAdmin displays this message when connecting, your server can be contacted
correctly over the network, but is not configured to accept your connection.
Your client has not been detected as a legal user for the database.
To connect to a server, the pg_hba.conf file on the database server must be configured to accept connections from the host of the pgAdmin client. Modify the pg_hba.conf file on the database server host, and add an entry in the form:
To connect to a server, the pg_hba.conf file on the database server must be
configured to accept connections from the host of the pgAdmin client. Modify
the pg_hba.conf file on the database server host, and add an entry in the form:
* **host template1 postgres 192.168.0.0/24 md5** for an IPV4 network
* **host template1 postgres ::ffff:192.168.0.0/120 md5** for an IPV6 network
For more information, please refer to the PostgreSQL documentation about `client authentication <http://www.postgresql.org/docs/current/interactive/client-authentication.html>`_.
For more information, please refer to the PostgreSQL documentation about
`client authentication <https://www.postgresql.org/docs/current/client-authentication.html>`_.
**FATAL: password authentication failed**
.. image:: images/ce_password_failed.png
:alt: Password authentication failed
:align: center
* The *password authentication failed for user* error message indicates there may be a problem with the password you entered. Retry the password to confirm you entered it correctly. If the error message returns, make sure that you have the correct password, that you are authorized to access the server, and that the access has been correctly configured in the server's postgresql.conf configuration file.
The *password authentication failed for user* error message indicates there
may be a problem with the password you entered. Retry the password to confirm
you entered it correctly. If the error message returns, make sure that you have
the correct password, that you are authorized to access the server, and that
the access has been correctly configured in the server's postgresql.conf
configuration file.
+27 -10
View File
@@ -1,31 +1,48 @@
.. _connect_to_server:
**************************
`Connect to server`:index:
`Connect to Server`:index:
**************************
Use the *Connect to Server* dialog to authenticate with a defined server and access the objects stored on the server through the pgAdmin tree control. To access the dialog, right click on the server name in the *pgAdmin* tree control, and select *Connect Server...* from the context menu.
Use the *Connect to Server* dialog to authenticate with a defined server and
access the objects stored on the server through the pgAdmin tree control. To
access the dialog, right click on the server name in the *pgAdmin* tree control,
and select *Connect Server...* from the context menu.
.. image:: images/connect_to_server.png
:alt: Connect to server dialog
Provide authentication information for the selected server:
* Use the *Password* field to provide the password of the user that is associated with the defined server.
* Check the box next to *Save Password* to instruct the server to save the password for future connections; if you save the password, you will not be prompted when reconnecting to the database server with this server definition.
* Use the *Password* field to provide the password of the user that is
associated with the defined server.
* Check the box next to *Save Password* to instruct the server to save the
password for future connections; if you save the password, you will not be
prompted when reconnecting to the database server with this server
definition.
In case of SSH Tunneling, *Connect to Server* dialog will prompt for SSH Tunnel and Database server passwords if not already saved.
When using SSH Tunneling, the *Connect to Server* dialog will prompt for the SSH
Tunnel and Database server passwords if not already saved.
.. image:: images/connect_to_tunneled_server.png
:alt: Connect to server dialog
Provide authentication information for the selected server:
* Use the *Password* field to provide the password of the user that is associated with the defined server.
* Check the box next to respective *Save Password* to instruct the server to save the password for future connections; if you save the password, you will not be prompted when reconnecting to the database server with this server definition.
* Use the *Password* field to provide the password of the user that is
associated with the defined server.
* Check the box next to respective *Save Password* to instruct the server to
save the password for future connections; if you save the password, you will
not be prompted when reconnecting to the database server with this server
definition.
The pgAdmin client displays a message in a green status bar in the lower right corner when the server connects successfully.
The pgAdmin client displays a message in a green status bar in the lower right
corner when the server connects successfully.
If you receive an error message while attempting a connection, verify that your network is allowing the pgAdmin host and the host of the database server to communicate. For detailed information about a specific error message, please see the :ref:`Connection Error <connect_error>` help page.
If you receive an error message while attempting a connection, verify that your
network is allowing the pgAdmin host and the host of the database server to
communicate. For detailed information about a specific error message, please see
the :ref:`Connection Error <connect_error>` help page.
To review or modify connection details, right-click on the name of the server, and select *Properties...* from the context menu.
To review or modify connection details, right-click on the name of the server,
and select *Properties...* from the context menu.
+9 -8
View File
@@ -1,7 +1,7 @@
.. _connecting:
*******************************
`Connecting to a Server`:index:
`Connecting To A Server`:index:
*******************************
Before you can use the pgAdmin client to manage the objects that reside on your
@@ -11,8 +11,6 @@ the server connections within the tree control for easier management. To open
the *Server Group* dialog, right-click on the *Servers* node of the tree
control, and select *Server Group* from the *Create* menu.
Contents:
.. toctree::
server_group_dialog
@@ -22,18 +20,21 @@ each new server that you wish to manage with pgAdmin. To open the *Server*
dialog, right-click on the *Servers* node of the tree control, and select
*Server* from the *Create* menu.
Contents:
.. toctree::
server_dialog
A master password is required to secure and later unlock saved server passwords.
It is set by the user and can be disabled using config.
.. toctree::
master_password
After defining a server connection, right-click on the server name, and select
*Connect to server* to authenticate with the server, and start using pgAdmin to
manage objects that reside on the server.
Contents:
.. toctree::
connect_to_server
@@ -45,4 +46,4 @@ of pgAdmin.
.. toctree::
export_import_servers
import_export_servers
+294 -36
View File
@@ -1,8 +1,8 @@
.. _container_deployment:
**************************************
*****************************
`Container Deployment`:index:
**************************************
*****************************
pgAdmin can be deployed in a container using the image at:
@@ -17,11 +17,11 @@ maintenance functions to be executed. Multiple versions are included in the
following directories to allow use with different versions of the database
server:
* PostgreSQL 9.4: /usr/local/pgsql-9.4
* PostgreSQL 9.5: /usr/local/pgsql-9.5
* PostgreSQL 9.6: /usr/local/pgsql-9.6
* PostgreSQL 10: /usr/local/pgsql-10
* PostgreSQL 11: /usr/local/pgsql-11
* PostgreSQL 9.5: */usr/local/pgsql-9.5*
* PostgreSQL 9.6: */usr/local/pgsql-9.6*
* PostgreSQL 10: */usr/local/pgsql-10*
* PostgreSQL 11: */usr/local/pgsql-11*
* PostgreSQL 12: */usr/local/pgsql-12*
The most recent version of the utilities is used by default; this may be
changed in the :ref:`preferences`.
@@ -31,19 +31,19 @@ Environment Variables
The container will accept the following variables at startup:
*PGADMIN_DEFAULT_EMAIL*
**PGADMIN_DEFAULT_EMAIL**
This is the email address used when setting up the initial administrator account
to login to pgAdmin. This variable is required and must be set at launch time.
*PGADMIN_DEFAULT_PASSWORD*
**PGADMIN_DEFAULT_PASSWORD**
This is the password used when setting up the initial administrator account to
login to pgAdmin. This variable is required and must be set at launch time.
*PGADMIN_ENABLE_TLS*
**PGADMIN_ENABLE_TLS**
Default: <null>
*Default: <null>*
If left un-set, the container will listen on port 80 for connections in plain
text. If set to any value, the container will listen on port 443 for TLS
@@ -51,63 +51,114 @@ connections.
When TLS is enabled, a certificate and key must be provided. Typically these
should be stored on the host file system and mounted from the container. The
expected paths are /certs/server.crt and /certs/server.key
expected paths are /certs/server.cert and /certs/server.key
*PGADMIN_LISTEN_ADDRESS*
**PGADMIN_LISTEN_ADDRESS**
Default: [::]
*Default: [::]*
Specify the local address that the servers listens on. The default should work
for most users - in IPv4-only environments, this may need to be set to
127.0.0.1.
0.0.0.0.
*PGADMIN_LISTEN_PORT*
**PGADMIN_LISTEN_PORT**
Default: 80 or 443 (if TLS is enabled)
*Default: 80 or 443 (if TLS is enabled)*
Allows the port that the server listens on to be set to a specific value rather
than using the default.
*GUNICORN_THREADS*
**PGADMIN_SERVER_JSON_FILE**
Default: 25
*Default: /pgadmin4/servers.json*
Override the default file path for the server definition list. See the
/pgadmin4/servers.json mapped file below for more information.
**GUNICORN_ACCESS_LOGFILE**
*Default: -* (stdout)
Specify an output file in which to store the Gunicorn access logs, instead of
sending them to stdout.
**GUNICORN_THREADS**
*Default: 25*
Adjust the number of threads the Gunicorn server uses to handle incoming
requests. This should typically be left as-is, except in highly loaded systems
where it may be increased.
**PGADMIN_CONFIG_**
This is a variable prefix that can be used to override any of the configuration
options in pgAdmin's *config.py* file. Add the *PGADMIN_CONFIG_* prefix to any
variable name from *config.py* and give the value in the format 'string value'
for strings, True/False for booleans or 123 for numbers. See below for an
example.
Settings are written to */pgadmin4/config_distro.py* within the container, which
is read after */pgadmin4/config.py* and before */pgadmin4/config_local.py*.
Any settings given will therefore override anything in config.py, but can be
overridden by settings in config_local.py.
See :ref:`config_py` for more information on the available configuration settings.
Mapped Files and Directories
****************************
The following files or directories can be mapped from the container onto the
host machine to allow configuration to be customised and shared between
instances:
instances.
*/var/lib/pgadmin*
.. warning:: Warning: pgAdmin runs as the *pgadmin* user (UID: 5050) in the
*pgadmin* group (GID: 5050) in the container. You must ensure that all files
are readable, and where necessary (e.g. the working/session directory)
writeable for this user on the host machine. For example:
.. code-block:: bash
sudo chown -R 5050:5050 <host_directory>
On some filesystems that do not support extended attributes, it may not be
possible to run pgAdmin without specifying a value for *PGADMIN_LISTEN_PORT*
that is greater than 1024. In such cases, specify an alternate port when
launching the container by adding the environment variable, for example:
.. code-block:: bash
-e 'PGADMIN_LISTEN_PORT=5050'
Don't forget to adjust any host-container port mapping accordingly.
**/var/lib/pgadmin**
This is the working directory in which pgAdmin stores session data, user files,
configuration files, and it's configuration database. Mapping this directory
onto the host machine gives you an easy way to maintain configuration between
invocations of the container.
*/pgadmin4/config_local.py*
**/pgadmin4/config_local.py**
This file can be used to override configuration settings in pgAdmin. Settings
found in config.py can be overridden with deployment specific values if
required.
required. Settings in config_local.py will also override anything specified in
the container environment through *PGADMIN_CONFIG_* prefixed variables.
*/pgadmin4/servers.json*
**/pgadmin4/servers.json**
If this file is mapped, server definitions found in it will be loaded at launch
time. This allows connection information to be pre-loaded into the instance of
pgAdmin in the container.
pgAdmin in the container. Note that server definitions are only loaded on first
launch, i.e. when the configuration database is created, and not on subsequent
launches using the same configuration database.
*/certs/server.cert*
**/certs/server.cert**
If TLS is enabled, this file will be used as the servers TLS certificate.
*/certs/server.key*
**/certs/server.key**
If TLS is enabled, this file will be used as the key file for the servers TLS
certificate.
@@ -121,8 +172,21 @@ Run a simple container over port 80:
docker pull dpage/pgadmin4
docker run -p 80:80 \
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-d dpage/pgadmin4
Run a simple container over port 80, setting some configuration options:
.. code-block:: bash
docker pull dpage/pgadmin4
docker run -p 80:80 \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-e 'PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True' \
-e 'PGADMIN_CONFIG_LOGIN_BANNER="Authorised users only!"' \
-e 'PGADMIN_CONFIG_CONSOLE_LOG_LEVEL=10' \
-d dpage/pgadmin4
Run a TLS secured container using a shared config/storage directory in
@@ -133,11 +197,205 @@ Run a TLS secured container using a shared config/storage directory in
docker pull dpage/pgadmin4
docker run -p 443:443 \
-v "/private/var/lib/pgadmin:/var/lib/pgadmin" \
-v "/path/to/certificate.cert:/certs/server.cert" \
-v "/path/to/certificate.key:/certs/server.key" \
-v "/tmp/servers.json:/servers.json" \
-v /private/var/lib/pgadmin:/var/lib/pgadmin \
-v /path/to/certificate.cert:/certs/server.cert \
-v /path/to/certificate.key:/certs/server.key \
-v /tmp/servers.json:/pgadmin4/servers.json \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-e 'PGADMIN_ENABLE_TLS=True' \
-d dpage/pgadmin4
Reverse Proxying
****************
Sometimes it's desirable to have users connect to pgAdmin through a reverse
proxy rather than directly to the container it's running in. The following
examples show how this can be achieved. With traditional reverse proxy servers
such as `Nginx <https://www.nginx.com/>`_, pgAdmin is running in a container on
the same host, with port 5050 on the host mapped to port 80 on the container,
for example:
.. code-block:: bash
docker pull dpage/pgadmin4
docker run -p 5050:80 \
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-e "PGADMIN_ENABLE_TLS=True" \
-d dpage/pgadmin4
-d dpage/pgadmin4
pgAdmin X-Forwarded-* Configuration
-----------------------------------
pgAdmin needs to understand how many proxies set each header so it knows what
values to trust. The configuration parameters for the X-Forwarded-* options
which are used for this purpose are shown below, along with their default
values.
pgAdmin is configured by default to be able to run behind a reverse proxy even
on a non-standard port and these config options don't normally need to be
changed. If you're running an unusual configuration (such as multiple reverse
proxies) you can adjust the configuration to suit.
.. code-block:: python
# Number of values to trust for X-Forwarded-For
PROXY_X_FOR_COUNT = 1
# Number of values to trust for X-Forwarded-Proto.
PROXY_X_PROTO_COUNT = 0
# Number of values to trust for X-Forwarded-Host.
PROXY_X_HOST_COUNT = 0
# Number of values to trust for X-Forwarded-Port.
PROXY_X_PORT_COUNT = 1
# Number of values to trust for X-Forwarded-Prefix.
PROXY_X_PREFIX_COUNT = 0
HTTP via Nginx
--------------
A configuration similar to the following can be used to create a simple HTTP
reverse proxy listening for all hostnames with `Nginx
<https://www.nginx.com/>`_:
.. code-block:: nginx
server {
listen 80;
server_name _;
location / {
proxy_set_header Host $host;
proxy_pass http://localhost:5050/;
proxy_redirect off;
}
}
If you wish to host pgAdmin under a subdirectory rather than on the root of the
server, you must specify the location and set the *X-Script-Name* header which
tells the pgAdmin container how to rewrite paths:
.. code-block:: nginx
server {
listen 80;
server_name _;
location /pgadmin4/ {
proxy_set_header X-Script-Name /pgadmin4;
proxy_set_header Host $host;
proxy_pass http://localhost:5050/;
proxy_redirect off;
}
}
If Nginx is also running in a container, there is no need to map the pgAdmin
port to the host, provided the two containers are running in the same Docker
network. In such a configuration, the *proxy_pass* option would be changed to
point to the pgAdmin container within the Docker network.
HTTPS via Nginx
---------------
The following configuration can be used to serve pgAdmin over HTTPS to the user
whilst the backend container is serving plain HTTP to the proxy server. In this
configuration we not only set *X-Script-Name*, but also *X-Scheme* to tell the
pgAdmin server to generate any URLs using the correct scheme. A redirect from
HTTP to HTTPS is also included. The certificate and key paths may need to be
adjusted as appropriate to the specific deployment:
.. code-block:: nginx
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name _;
ssl_certificate /etc/nginx/server.cert;
ssl_certificate_key /etc/nginx/server.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location /pgadmin4/ {
proxy_set_header X-Script-Name /pgadmin4;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $host;
proxy_pass http://localhost:5050/;
proxy_redirect off;
}
}
Traefik
-------
Configuring `Traefik <https://traefik.io/>`_ is straightforward for either HTTP
or HTTPS when running pgAdmin in a container as it will automatically configure
itself to serve content from containers that are running on the local machine,
virtual hosting them at *<container_name>.<domain_name>*, where the domain
name is that specified in the Traefik configuration. The container is typically
launched per the example below:
.. code-block:: bash
docker pull dpage/pgadmin4
docker run --name "pgadmin4" \
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-d dpage/pgadmin4
Note that the TCP/IP port has not been mapped to the host as it was in the
Nginx example, and the container name has been set to a known value as it will
be used as the hostname and may need to be added to the DNS zone file.
The following configuration will listen on ports 80 and 443, redirecting 80 to
443, using the default certificate shipped with Traefik. See the Traefik
documentation for options to use certificates from LetsEncrypt or other issuers.
.. code-block:: ini
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[docker]
domain = "domain_name"
watch = true
If you wish to host pgAdmin under a subdirectory using Traefik, the
configuration changes are typically made to the way the container is launched
and not to Traefik itself. For example, to host pgAdmin under */pgadmin4/*
instead of at the root directory, the Traefik configuration above may be used if
the container is launched like this:
.. code-block:: bash
docker pull dpage/pgadmin4
docker run --name "pgadmin4" \
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-e "SCRIPT_NAME=/pgadmin4" \
-l "traefik.frontend.rule=PathPrefix:/pgadmin4" \
-d dpage/pgadmin4
The *SCRIPT_NAME* environment variable has been set to tell the container it is
being hosted under a subdirectory (in the same way as the *X-Script-Name* header
is used with Nginx), and a label has been added to tell Traefik to route
requests under the subdirectory to this container.
+7 -4
View File
@@ -4,11 +4,14 @@
`pgAdmin Project Contributions`:index:
**************************************
pgAdmin is an open-source project that invites you to get involved in the development process. For more information about contributing to the pgAdmin project, contact the developers on the pgAdmin mailing list pgadmin-hackers@postgresql.org to discuss any ideas you might have for enhancements or bug fixes.
pgAdmin is an open-source project that invites you to get involved in the
development process. For more information about contributing to the pgAdmin
project, contact the developers on the pgAdmin mailing list
pgadmin-hackers@postgresql.org to discuss any ideas you might have for
enhancements or bug fixes.
In the sections listed below, you'll find detailed information about the development process used to develop, improve, and maintain the pgAdmin client.
Contents:
In the following sections, you'll find detailed information about the
development process used to develop, improve, and maintain the pgAdmin client.
.. toctree::
+75 -26
View File
@@ -4,83 +4,132 @@
`Database Dialog`:index:
************************
Use the *Database* dialog to define or modify a database. To create a database, you must be a database superuser or have the CREATE privilege.
Use the *Database* dialog to define or modify a database. To create a database,
you must be a database superuser or have the CREATE privilege.
The *Database* dialog organizes the development of a database through the following dialog tabs: *General*, *Definition*, *Security*, and *Parameters*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Database* dialog organizes the development of a database through the
following dialog tabs: *General*, *Definition*, *Security*, and *Parameters*.
The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/database_general.png
:alt: Database dialog general tab
:align: center
Use the fields in the *General* tab to identify the database:
* Use the *Database* field to add a descriptive name for the database. The name will be displayed in the *pgAdmin* tree control.
* Select the owner of the database from the drop-down listbox in the *Owner* field.
* Use the *Database* field to add a descriptive name for the database. The name
will be displayed in the *pgAdmin* tree control.
* Select the owner of the database from the drop-down listbox in the *Owner*
field.
* Store notes about the database in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/database_definition.png
:alt: Database dialog definition tab
:align: center
Use the *Definition* tab to set properties for the database:
* Select a character set from the drop-down listbox in the *Encoding* field. The default is *UTF8*.
* Select a template from the drop-down listbox in the *Template* field. If you do not specify a template, the database will use template1.
* Select a tablespace from the drop-down listbox in the *Tablespace* field. The selected tablespace will be the default tablespace used to contain database objects.
* Select a character set from the drop-down listbox in the *Encoding* field.
The default is *UTF8*.
* Select a template from the drop-down listbox in the *Template* field. If you
do not specify a template, the database will use template1.
* Select a tablespace from the drop-down listbox in the *Tablespace* field. The
selected tablespace will be the default tablespace used to contain database
objects.
* Select the collation order from the drop-down listbox in the *Collation* field.
* Select the character classification from the drop-down listbox in the *Character Type* field. This affects the categorization of characters, e.g. lower, upper and digit. The default, or a blank field, uses the character classification of the template database.
* Specify a connection limit in the *Connection Limit* field to configure the maximum number of connection requests. The default value (*-1*) allows unlimited connections to the database.
* Select the character classification from the drop-down listbox in the
*Character Type* field. This affects the categorization of characters, e.g.
lower, upper and digit. The default, or a blank field, uses the character
classification of the template database.
* Specify a connection limit in the *Connection Limit* field to configure the
maximum number of connection requests. The default value (*-1*) allows
unlimited connections to the database.
Click the *Security* tab to continue.
.. image:: images/database_security.png
:alt: Database dialog security tab
:align: center
Use the *Security* tab to assign privileges and define security labels.
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon (+) to set privileges for database objects:
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon
(+) to set privileges for database objects:
* 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 inside the *Privileges* field. Check the boxes to the left of one or
more privileges to grant the selected privilege to the specified user.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
Click add to set additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Click add to set 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 database. Click the *Add* icon (+) to add each security label selection:
Use the *Security Labels* panel to define security labels applied to the
database. Click the *Add* icon (+) 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.
* 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.
To discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
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 *Parameters* tab to continue.
.. image:: images/database_parameters.png
:alt: Database dialog parameters tab
:align: center
Use the *Parameters* tab to set parameters for the database. Click the *Add* icon (+) to add each parameter:
Use the *Parameters* tab to set parameters for the database. Click the *Add*
icon (+) to add each parameter:
* Use the drop-down listbox in the *Name* field to select a parameter.
* Use the *Value* field to set a value for the parameter.
* Use the drop-down listbox next to *Role* to select a role to which the parameter setting specified will apply.
* Use the drop-down listbox next to *Role* to select a role to which the
parameter setting specified will apply.
Follow these steps to add additional parameter value definitions; to discard a parameter, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Follow these steps to add additional parameter value definitions; to discard a
parameter, click the trash icon to the left of the row and confirm deletion in
the *Delete Row* popup.
Click the *Advanced* tab to continue.
.. image:: images/database_advanced.png
:alt: Database dialog advanced tab
:align: center
Use the *Advanced* tab to set advanced parameters for the database.
* Use *Schema restriction* field to provide a SQL restriction that will be used
against the pg_namespace table to limit the schemas that you see.
For example, you might enter: *public* so that only *public* are shown in
the pgAdmin browser.Separate entries with a comma or tab as you type.
Click the *SQL* tab to continue.
Your entries in the *Database* 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.
Your entries in the *Database* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Database* dialog:
The following is an example of the sql command generated by user selections in
the *Database* dialog:
.. image:: images/database_sql.png
:alt: Database dialog sql tab
:align: center
The example creates a database named *hr* that is owned by *postgres*. It allows unlimited connections, and is available to all authenticated users.
The example creates a database named *hr* that is owned by *postgres*. It
allows unlimited connections, and is available to all authenticated users.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+83 -29
View File
@@ -1,38 +1,63 @@
.. _debugger:
*************************
`pgAdmin Debugger`:index:
*************************
*****************
`Debugger`:index:
*****************
.. image:: images/debug_main.png
:alt: Debugger page
:align: center
The debugger may be used to debug PL/pgSQL functions in PostgreSQL, as well as EDB-SPL functions, stored procedures and packages in Advanced Server. The Debugger is available as an extension for your PostgreSQL installation, and is distributed as part of Advanced Server. You must have superuser privileges to use the debugger.
The debugger may be used to debug PL/pgSQL functions in PostgreSQL, as well as
EDB-SPL functions, stored procedures and packages in EDB Postgres Advanced
Server. The Debugger is available as an extension for your PostgreSQL
installation, and is distributed as part of Advanced Server. You must have
superuser privileges to use the debugger.
Before using the debugger, you must modify the *postgresql.conf* file, adding the server-side debugger components to the the value of the *shared_preload_libraries* parameter:
Before using the debugger, you must modify the *postgresql.conf* file, adding
the server-side debugger components to the the value of the
*shared_preload_libraries* parameter, for example:
shared_preload_libraries = '$libdir/*other_libraries*/plugin_debugger'
shared_preload_libraries = '$libdir/plugin_debugger'
After modifying the *shared_preload_libraries* parameter, restart the server to apply the changes.
After modifying the *shared_preload_libraries* parameter, restart the server to
apply the changes.
The debugger may be used for either in-context debugging or direct debugging of a target function or procedure. When you use the debugger for in-context debugging, you set a breakpoint at the first line of a program; when a session invokes the target, control is transferred to the debugger. When using direct debugging, the debugger prompts you for any parameters required by the target, and then allows you to step through the code.
The debugger may be used for either in-context debugging or direct debugging of
a target function or procedure. When you use the debugger for in-context
debugging, you set a breakpoint at the first line of a program; when a session
invokes the target, control is transferred to the debugger. When using direct
debugging, the debugger prompts you for any parameters required by the target,
and then allows you to step through the code.
**In-context Debugging**
In-context Debugging
********************
To set a breakpoint at the first line of a program, right-click the name of the object you would like to debug, and select *Set breakpoint* from the *Debugging* sub-menu. The debugger window will open, waiting for another session to invoke the program.
To set a breakpoint at the first line of a program, right-click the name of the
object you would like to debug, and select *Set breakpoint* from the *Debugging*
sub-menu. The debugger window will open, waiting for another session to invoke
the program.
.. image:: images/debug_set_breakpoint.png
:alt: Debugger set a breakpoint demo
:align: center
When another session invokes the target, the debugger will display the code, allowing you to add break points, or step through line-by-line. The other session is suspended until the debugging completes; then control is returned to the session.
When another session invokes the target, the debugger will display the code,
allowing you to add break points, or step through line-by-line. The other
session is suspended until the debugging completes; then control is returned
to the session.
.. image:: images/debug_ic_step_in.png
:alt: Debugger step-in demo
:align: center
Direct Debugging
****************
**Direct Debugging**
To use the debugger for direct debugging, right click on the name of the object that you wish to debug in the pgAdmin tree control and select *Debug* from the *Debugging* sub-menu. The debugger window will open, prompting you for any values required by the program:
To use the debugger for direct debugging, right click on the name of the object
that you wish to debug in the pgAdmin tree control and select *Debug* from the
*Debugging* sub-menu. The debugger window will open, prompting you for any
values required by the program:
.. image:: images/debug_params.png
:alt: Debugger parameter dialog
@@ -43,22 +68,37 @@ Use the fields on the *Debugger* dialog to provide a value for each parameter:
* The *Type* field contains the parameter data type.
* Check the *Null?* checkbox to indicate that the parameter is a NULL value.
* Check the *Expression?* checkbox if the Value field contains an expression.
* Use the *Value* field to provide the parameter value that will be passed to the program. When entering parameter values, type the value into the appropriate cell on the grid, or, leave the cell empty to represent NULL, enter '' (two single quotes) to represent an empty string, or to enter a literal string consisting of just two single quotes, enter \'\'. PostgreSQL 8.4 and above supports variadic function parameters. These may be entered as a comma-delimited list of values, quoted and/or cast as required.
* Check the *Use default?* checkbox to indicate that the program should use the value in the Default Value field.
* Use the *Value* field to provide the parameter value that will be passed to
the program. When entering parameter values, type the value into the
appropriate cell on the grid, or, leave the cell empty to represent NULL,
enter '' (two single quotes) to represent an empty string, or to enter a
literal string consisting of just two single quotes, enter \'\'. PostgreSQL
8.4 and above supports variadic function parameters. These may be entered as
a comma-delimited list of values, quoted and/or cast as required.
* Check the *Use default?* checkbox to indicate that the program should use
the value in the Default Value field.
* The *Default Value* field contains the default value of the parameter.
Provide values required by the program, and click the *Debug* button to start stepping through the program.
Provide values required by the program, and click the *Debug* button to start
stepping through the program.
The values of the arguments provided here are saved. The values will be pre-filled
next time the dialog opens. To clear the values, use the *Clear All* button.
.. image:: images/debug_step_in.png
:alt: Debugger step-in demo
:align: center
Using the Debugger
******************
**Using the Debugger**
The main debugger window consists of two panels and a context-sensitive toolbar. Use toolbar icons to manage breakpoints and step into or through code; hover over an icon for a tooltip that identifies the option associated with the icon. The toolbar options are:
The main debugger window consists of two panels and a context-sensitive toolbar.
Use toolbar icons to manage breakpoints and step into or through code; hover
over an icon for a tooltip that identifies the option associated with the icon.
The toolbar options are:
.. image:: images/debug_toolbar.png
:alt: Debugger navigation toolbar
:align: center
+-------------------------+-----------------------------------------------------------------------------------------------------------+
| Option | Action |
@@ -78,33 +118,47 @@ The main debugger window consists of two panels and a context-sensitive toolbar.
| *Stop* | Click the *Stop* icon to halt the execution of a program. |
+-------------------------+-----------------------------------------------------------------------------------------------------------+
The top panel of the debugger window displays the program body; click in the grey margin next to a line number to add a breakpoint. The highlighted line in the top panel is the line that is about to execute.
The top panel of the debugger window displays the program body; click in the
grey margin next to a line number to add a breakpoint. The highlighted line in
the top panel is the line that is about to execute.
.. image:: images/debug_main.png
:alt: Debugger main window
:align: center
The lower panel of the debugger window provides a set of tabs that allow you to review information about the program:
The lower panel of the debugger window provides a set of tabs that allow you to
review information about the program:
* The *Parameters* tab displays the value of each parameter.
* The *Local* variables tab displays the current value of the program variables.
* The *Messages* tab displays any messages returned by the server (errors, warnings and informational messages).
* The *Messages* tab displays any messages returned by the server (errors,
warnings and informational messages).
* The *Results* tab displays the server message when the program completes.
* The *Stack* tab displays the list of functions that have been invoked, but which have not yet completed.
* The *Stack* tab displays the list of functions that have been invoked, but
which have not yet completed.
As you step through a program, the *Local variables* tab displays the current value of each variable:
As you step through a program, the *Local variables* tab displays the current
value of each variable:
.. image:: images/debug_variables.png
:alt: Debugger local variables tab
:align: center
When you step into a subroutine, the *Stack* tab displays the call stack, including the name of each caller, the parameter values for each caller (if any), and the line number within each caller:
When you step into a subroutine, the *Stack* tab displays the call stack,
including the name of each caller, the parameter values for each caller (if
any), and the line number within each caller:
.. image:: images/debug_stack.png
:alt: Debugger local stack tab
:align: center
Select a caller to change focus to that stack frame and display the state of the caller in the upper panel.
Select a caller to change focus to that stack frame and display the state of
the caller in the upper panel.
When the program completes, the *Results* tab displays the message returned by the server. If the program encounters an error, the *Messages* tab displays details:
When the program completes, the *Results* tab displays the message returned by
the server. If the program encounters an error, the *Messages* tab displays
details:
.. image:: images/debug_error_message.png
:alt: Debugger error message
:align: center
+6 -7
View File
@@ -1,8 +1,8 @@
.. _deployment:
***************************
`pgAdmin Deployment`:index:
***************************
*******************
`Deployment`:index:
*******************
Pre-compiled and configured installation packages for pgAdmin 4 are available
for a number of desktop environments; we recommend using an installer whenever
@@ -10,11 +10,10 @@ possible. If you are interested in learning more about the project, or if a
pgAdmin installer is not available for your environment, the pages listed below
will provide detailed information about creating a custom deployment.
Contents:
.. toctree::
:maxdepth: 2
config_py
desktop_deployment
server_deployment
container_deployment
container_deployment
+23 -31
View File
@@ -36,28 +36,10 @@ this is overridden by the desktop runtime at startup. In most environments, no
Python configuration is required unless you wish to override other default
settings.
There are multiple configuration files that are read at startup by pgAdmin. These
are as follows:
* ``config.py``: This is the main configuration file, and should not be modified.
It can be used as a reference for configuration settings, that may be overridden
in one of the following files.
* ``config_distro.py``: This file is read after ``config.py`` and is intended for
packagers to change any settings that are required for their pgAdmin distribution.
This may typically include certain paths and file locations.
* ``config_local.py``: This file is read after ``config_distro.py`` and is intended
for end users to change any default or packaging specific settings that they may
wish to adjust to meet local preferences or standards.
.. note:: If the SERVER_MODE setting is changed in ``config_distro.py`` or ``config_local.py``,
you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH
and STORAGE_DIR values as well as they will have been set based on the default
configuration or overridden by the runtime.
See :ref:`config_py` for more information on configuration settings.
Runtime
-------
*******
When executed, the runtime will automatically try to execute the pgAdmin Python
application. If execution fails, it will prompt you to adjust the Python Path
@@ -76,15 +58,25 @@ and the registry on Windows (HKEY_CURRENT_USER\\Software\\pgadmin\\pgadmin4).
The configuration settings:
+--------------------------+--------------------+---------------------------------------------------------------+
| Key | Type | Purpose |
+==========================+====================+===============================================================+
| ApplicationPath | String | The directory containing pgAdmin4.py |
+--------------------------+--------------------+---------------------------------------------------------------+
| BrowserCommand | String | An alternate command to run instead of the default browser. |
+--------------------------+--------------------+---------------------------------------------------------------+
| ConnectionTimeout | Integer | The number of seconds to wait for application server startup. |
+--------------------------+--------------------+---------------------------------------------------------------+
| PythonPath | String | The Python module search path |
+--------------------------+--------------------+---------------------------------------------------------------+
.. table::
:class: longtable
:widths: 2 1 4
+--------------------------+--------------------+---------------------------------------------------------------+
| Key | Type | Purpose |
+==========================+====================+===============================================================+
| ApplicationPath | String | The directory containing pgAdmin4.py |
+--------------------------+--------------------+---------------------------------------------------------------+
| BrowserCommand | String | An alternate command to run instead of the default browser. |
+--------------------------+--------------------+---------------------------------------------------------------+
| ConnectionTimeout | Integer | The number of seconds to wait for application server startup. |
+--------------------------+--------------------+---------------------------------------------------------------+
| FixedPort | Boolean | Use a fixed network port number rather than a random one. |
+--------------------------+--------------------+---------------------------------------------------------------+
| OpenTabAtStartup | Boolean | Open a browser tab at startup. |
+--------------------------+--------------------+---------------------------------------------------------------+
| PortNumber | Integer | The port number to use, if using a fixed port. |
+--------------------------+--------------------+---------------------------------------------------------------+
| PythonPath | String | The Python module search path |
+--------------------------+--------------------+---------------------------------------------------------------+
+6 -4
View File
@@ -4,12 +4,14 @@
`Developer Tools`:index:
************************
The pgAdmin *Tools* menu displays a list of powerful developer tools that you can use to execute and analyze complex SQL commands, manage data, and debug PL/SQL code.
Contents:
The pgAdmin *Tools* menu displays a list of powerful developer tools that you
can use to execute and analyze complex SQL commands, manage data, and debug
PL/SQL code.
.. toctree::
:maxdepth: 2
debugger
query_tool
editgrid
schema_diff
+32 -10
View File
@@ -4,42 +4,64 @@
`Domain Constraints Dialog`:index:
**********************************
Use the *Domain Constraints* dialog to create or modify a domain constraint. A domain constraint confirms that the values provided for a domain meet a defined criteria. The *Domain Constraints* dialog implements options of the ALTER DOMAIN command.
Use the *Domain Constraints* dialog to create or modify a domain constraint. A
domain constraint confirms that the values provided for a domain meet a defined
criteria. The *Domain Constraints* dialog implements options of the ALTER DOMAIN
command.
The *Domain Constraints* dialog organizes the development of a domain constraint through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Domain Constraints* dialog organizes the development of a domain constraint
through the following dialog tabs: *General* and *Definition*. The *SQL* tab
displays the SQL code generated by dialog selections.
.. image:: images/domain_constraint_general.png
:alt: Domain constraint dialog general tab
:align: center
Use the fields in the *General* tab to identify the domain constraint:
* Use the *Name* field to add a descriptive name for the constraint. The name will be displayed in the *pgAdmin* tree control.
* Use the *Name* field to add a descriptive name for the constraint. The name
will be displayed in the *pgAdmin* tree control.
* Store notes about the constraint in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/domain_constraint_definition.png
:alt: Domain constraint dialog general tab
:align: center
Use the fields in the *Definition* tab to define the domain constraint:
* Use the *Check* field to provide a CHECK expression. A CHECK expression specifies a constraint that the domain must satisfy. A constraint must produce a Boolean result; include the key word VALUE to refer to the value being tested. Only those expressions that evaluate to TRUE or UNKNOWN will succeed. A CHECK expression cannot contain subqueries or refer to variables other than VALUE. If a domain has multiple CHECK constraints, they will be tested in alphabetical order.
* Move the *Validate?* switch to the *No* position to mark the constraint NOT VALID. If the constraint is marked NOT VALID, the constraint will not be applied to existing column data. The default value is *Yes*.
* Use the *Check* field to provide a CHECK expression. A CHECK expression
specifies a constraint that the domain must satisfy. A constraint must produce
a Boolean result; include the key word VALUE to refer to the value being
tested. Only those expressions that evaluate to TRUE or UNKNOWN will succeed.
A CHECK expression cannot contain subqueries or refer to variables other than
VALUE. If a domain has multiple CHECK constraints, they will be tested in
alphabetical order.
* Move the *Validate?* switch to the *No* position to mark the constraint NOT
VALID. If the constraint is marked NOT VALID, the constraint will not be
applied to existing column data. The default value is *Yes*.
Click the *SQL* tab to continue.
Your entries in the *Domain Constraints* 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.
Your entries in the *Domain Constraints* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Domain Constraints* dialog:
The following is an example of the sql command generated by user selections in
the *Domain Constraints* dialog:
.. image:: images/domain_constraint_sql.png
:alt: Domain constraint dialog general tab
:align: center
The example shown demonstrates creating a domain constraint on the domain *timesheets* named *weekday*. It constrains a value to equal *Friday*.
The example shown demonstrates creating a domain constraint on the domain
*timesheets* named *weekday*. It constrains a value to equal *Friday*.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+68 -23
View File
@@ -4,75 +4,120 @@
`Domain Dialog`:index:
**********************
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.
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.
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
:alt: Domain dialog general tab
:align: center
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 that will own the domain.
* Select the name of the schema in which the domain will reside from the drop-down listbox in the *Schema* field.
* 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 that will own the
domain.
* Select the name of the schema in which the domain 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
:alt: Domain dialog definition tab
:align: center
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.
* 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
:alt: Domain dialog constraints tab
:align: center
Use the fields in the *Constraints* tab to specify rules for the domain. Click the *Add* icon (+) to set constraints:
Use the fields in the *Constraints* tab to specify rules for the domain. Click
the *Add* icon (+) 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.
* Use the *Validate* checkbox to determine whether the constraint will be
validated. The default checkbox is checked and sets a validation requirement.
A CHECK clause specifies an integrity test which values of the domain must satisfy. Each constraint must be an expression that produces a Boolean result. 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. A CHECK expression 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.
A CHECK clause specifies an integrity test which values of the domain must
satisfy. Each constraint must be an expression that produces a Boolean result.
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. A CHECK expression 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 the *Add* icon (+) 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 *Add* icon (+) 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
:alt: Domain dialog security tab
:align: center
Use the *Security Labels* panel to assign security labels. Click the *Add* icon (+) to add a label:
Use the *Security Labels* panel to assign security labels. Click the *Add* icon
(+) 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.
* 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 the *Add* icon (+) 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 *Add* icon (+) 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.
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**
Example
*******
The following is an example of the sql command generated by selections made in the *Domain* dialog:
The following is an example of the sql command generated by selections made in
the *Domain* dialog:
.. image:: images/domain_sql.png
:alt: Domain dialog sql tab
:align: center
The example shown demonstrates creating a domain named *minimum-wage* that confirms that the value entered is greater than or equal to *7.25*.
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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+83 -82
View File
@@ -1,130 +1,126 @@
.. _editgrid:
***********************************
`Reviewing and Editing Data`:index:
***********************************
***********************
`View/Edit Data`:index:
***********************
To review or modify data, right click on a table or view name in the *Browser* tree control. When the context menu opens, use the *View/Edit Data* menu to specify the number of rows you would like to display in the editor panel.
To view or modify data, right click on a table or view name in the *Browser*
tree control. When the context menu opens, use the *View/Edit Data* menu to
specify the number of rows you would like to display in the editor panel.
.. image:: images/editgrid.png
:alt: Edit grid window
:align: center
To modify the content of a table, each row in the table must be uniquely identifiable. If the table definition does not include an OID or a primary key, the displayed data is read only. Note that views cannot be edited; updatable views (using rules) are not supported.
To modify the content of a table, each row in the table must be uniquely
identifiable. If the table definition does not include an OID or a primary key,
the displayed data is read only. Note that views cannot be edited; updatable
views (using rules) are not supported.
The editor features a toolbar that allows quick access to frequently used options, and a work environment divided into two panels:
The editor features a toolbar that allows quick access to frequently used
options, and a work environment divided into two panels:
* The upper panel displays the SQL command that was used to select the content displayed in the lower panel.
* The lower panel (the Data Grid) displays the data selected from the table or view.
* The upper panel displays the SQL command that was used to select the content
displayed in the lower panel.
* The lower panel (the Data Grid) displays the data selected from the table or
view.
**The View/Edit Data Toolbar**
The View/Edit Data Toolbar
**************************
The toolbar includes context-sensitive icons that provide shortcuts to frequently performed tasks.
The :ref:`Query Tool <query_tool>` and :ref:`View/Edit Data <editgrid>` tools
are actually different operating modes of the same tool. Some controls will be
disabled in either mode. Please see
:ref:`The Query Tool Toolbar <query_tool_toolbar>` for a description of the
available controls.
.. image:: images/editgrid_toolbar.png
:alt: Edit grid toolbar
.. _data-grid:
Hover over an icon to display a tooltip that describes the icon's functionality.
The Data Grid
*************
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+=============+
| *Save* | Use the *Save* icon to save your changes to the currently displayed table contents. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Find* | Use options on the *Find* menu to access Search and Replace functionality or to Jump to another | Ctrl/Cmd +F |
| | line. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Copy* | Click the *Copy* icon to copy the currently selected data. | Ctrl+C |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Paste Row* | Click the *Paste Row* icon to paste the content that is currently on the clipboard. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Delete Row* | Use the *Delete Row* icon to delete all the selected rows from the output panel. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Filter* | Click the *Filter* icon to open a dialog that allows you to write and apply a filter for the | |
| | content currently displayed in the output panel. Click the down arrow to open the *Filter* drop- | |
| | down menu and select from pre-defined options: | |
| | | |
| | Use options on the *Filter* menu to quick-sort or quick-filter the data set: | |
| | | |
| | * Filter: This option opens a dialog that allows you to define a filter. A filter is a | |
| | condition that is supplied to an arbitrary WHERE clause that restricts the result set. | |
| | | |
| | * Remove Filter: This option removes all selection / exclusion filter conditions. | |
| | | |
| | * By Selection: This option refreshes the data set and displays only those rows whose | |
| | column value matches the value in the cell currently selected. | |
| | | |
| | * Exclude Selection: This option refreshes the data set and excludes those rows whose | |
| | column value matches the value in the cell currently selected. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *No limit* | Use the *No limit* drop-down listbox to specify how many rows to display in the output panel. | |
| | Select from: *No limit* (the default), *1000 rows*, *500 rows*, or *100 rows*. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Execute/Refresh* | Click the *Execute/Refresh* icon to execute the SQL command that is displayed in the top panel. | F5 |
| | If you have not saved modifications to the content displayed in the data grid, you will be | |
| | prompted to confirm the execution. To preserve your changes before refreshing the content, click | |
| | the *Save* toolbar button before executing the refresh. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Stop* | Click the *Stop* icon to cancel the execution of the currently running query. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Clear History* | Use the *Clear History* drop-down menu to erase the contents of the *History* tab. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
| *Download as CSV* | Click the *Download as CSV* icon to download the result set of the current query to a | F8 |
| | comma-separated list. You can control the CSV settings through | |
| | *Preferences -> SQL Editor -> CSV output* dialogue. | |
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
**The Data Grid**
The top row of the data grid displays the name of each column, the data type, and if applicable, the number of characters allowed. A column that is part of the primary key will additionally be marked with [PK].
The top row of the data grid displays the name of each column, the data type,
and if applicable, the number of characters allowed. A column that is part of
the primary key will additionally be marked with [PK].
To modify the displayed data:
* To change a numeric value within the grid, double-click the value to select the field. Modify the content in the square in which it is displayed.
* To change a non-numeric value within the grid, double-click the content to access the edit bubble. After modifying the contentof the edit bubble, click the *Save* button to display your changes in the data grid, or *Cancel* to exit the edit bubble without saving.
* To change a numeric value within the grid, double-click the value to select
the field. Modify the content in the square in which it is displayed.
* To change a non-numeric value within the grid, double-click the content to
access the edit bubble. After modifying the contentof the edit bubble, click
the *Ok* button to display your changes in the data grid, or *Cancel* to
exit the edit bubble without saving.
To enter a newline character, click Ctrl-Enter or Shift-Enter. Newline formatting is only displayed when the field content is accessed via an edit bubble.
To enter a newline character, click Ctrl-Enter or Shift-Enter. Newline
formatting is only displayed when the field content is accessed via an edit
bubble.
To add a new row to the table, enter data into the last (unnumbered) row of the table. As soon as you store the data, the row is assigned a row number, and a fresh empty line is added to the data grid.
To add a new row to the table, enter data into the last (unnumbered) row of the
table. As soon as you store the data, the row is assigned a row number, and a
fresh empty line is added to the data grid.
To write a SQL NULL to the table, simply leave the field empty. When you store the new row, the will server fill in the default value for that column. If you store a change to an existing row, the value NULL will explicitly be written.
To write a SQL NULL to the table, simply leave the field empty. When you store
the new row, the will server fill in the default value for that column. If you
store a change to an existing row, the value NULL will explicitly be written.
To write an empty string to the table, enter the special string '' (two single quotes) in the field. If you want to write a string containing solely two single quotes to the table, you need to escape these quotes, by typing \'\'
To write an empty string to the table, enter the special string '' (two single
quotes) in the field. If you want to write a string containing solely two single
quotes to the table, you need to escape these quotes, by typing \'\'
To delete a row, press the *Delete* toolbar button. A popup will open, asking you to confirm the deletion.
To delete a row, press the *Delete* toolbar button. A popup will open, asking
you to confirm the deletion.
To commit the changes to the server, select the *Save* toolbar button. Modifications to a row are written to the server automatically when you select a different row.
To commit the changes to the server, select the *Save Data* toolbar button.
**Geometry Data Viewer**
If PostGIS is installed, you can view GIS objects in a map by selecting row(s) and clicking the 'View Geometry' button in the column. If no rows are selected, the entire data set will be rendered:
If PostGIS is installed, you can view GIS objects in a map by selecting row(s)
and clicking the 'View Geometry' button in the column. If no rows are selected,
the entire data set will be rendered:
.. image:: images/geometry_viewer.png
:alt: Geometry Viewer Button
:align: center
You can adjust the layout by dragging the title of the panel. To view the properties of the geometries directly in map, just click the specific geometry:
You can adjust the layout by dragging the title of the panel. To view the
properties of the geometries directly in map, just click the specific geometry:
.. image:: images/geometry_viewer_property_table.png
:alt: Geometry Viewer Property Table
:align: center
Notes:
.. note::
- *Supported data types:* The Geometry Viewer supports 2D and 3DM geometries in EWKB format including `Point, LineString, Polygon MultiPoint, MultiLineString, MultiPolygon and GeometryCollection`.
- *Supported data types:* The Geometry Viewer supports 2D and 3DM geometries in
EWKB format including `Point, LineString, Polygon MultiPoint, MultiLineString,
MultiPolygon and GeometryCollection`.
- *SRIDs:* If there are geometries with different SRIDs in the same column, the viewer will render geometries with the same SRID in the map. If SRID=4326 the OSM tile layer will be added into the map.
- *SRIDs:* If there are geometries with different SRIDs in the same column, the
viewer will render geometries with the same SRID in the map. If SRID=4326 the
OSM tile layer will be added into the map.
- *Data size:* For performance reasons, the viewer will render no more than 100000 geometries, totaling up to 20MB.
- *Data size:* For performance reasons, the viewer will render no more than
100000 geometries, totaling up to 20MB.
- *Internet access:* An internet connection is required for the Geometry Viewer to function correctly.
- *Internet access:* An internet connection is required for the Geometry Viewer
to function correctly.
**Sort/Filter options dialog**
Sort/Filter options dialog
**************************
You can access *Sort/Filter options dialog* by clicking on Sort/Filter button. This allows you to specify an SQL Filter to limit the data displayed and data sorting options in the edit grid window:
You can access *Sort/Filter options dialog* by clicking on Sort/Filter button.
This allows you to specify an SQL Filter to limit the data displayed and data
sorting options in the edit grid window:
.. image:: images/editgrid_filter_dialog.png
:alt: Edit grid filter dialog window
:align: center
* Use *SQL Filter* to provide SQL filtering criteria. These will be added to the "WHERE" clause of the query used to retrieve the data. For example, you might enter:
* Use *SQL Filter* to provide SQL filtering criteria. These will be added to
the "WHERE" clause of the query used to retrieve the data. For example,
you might enter:
.. code-block:: sql
@@ -142,3 +138,8 @@ To delete a row from the grid, click the trash icon.
* Click the *Help* button (?) to access online help.
* Click the *Ok* button to save work.
* Click the *Close* button to discard current changes and close the dialog.
.. toctree::
:maxdepth: 2
viewdata_filter
+105
View File
@@ -0,0 +1,105 @@
.. _enabling_ldap_authentication:
**************************************************
`Enabling LDAP Authentication for pgAdmin`:index:
**************************************************
To enable LDAP authentication for pgAdmin, you must configure the LDAP
settings in the *config_local.py* or *config_system.py* file (see the
:ref:`config.py <config_py>` documentation) on the system where pgAdmin is
installed in Server mode. You can copy these settings from *config.py* file
and modify the values for the following parameters:
There are 3 ways to configure LDAP:
* Bind as pgAdmin user
* Anonymous bind
* Dedicated user bind
.. csv-table::
:header: "**Parameter**", "**Description**"
:class: longtable
:widths: 35, 55
"AUTHENTICATION_SOURCES","The default value for this parameter is *internal*.
To enable LDAP authentication, you must include *ldap* in the list of values
for this parameter. you can modify the value as follows:
* [‘ldap’]: pgAdmin will use only LDAP authentication.
* [‘ldap’, ‘internal’]: pgAdmin will first try to authenticate the user through
LDAP. If that authentication fails, then internal user entries of pgAdmin
will be used for authentication.
* [‘internal’, ‘ldap’]: pgAdmin will first try to authenticate the user
through internal user entries. If that authentication fails, then LDAP
authentication will be used."
"LDAP_AUTO_CREATE_USER", "Specifies if you want to automatically create a pgAdmin
user corresponding to the LDAP user credentials. Please note that LDAP password
is not stored in the pgAdmin database."
"LDAP_CONNECTION_TIMEOUT","Specifies the connection timeout (in seconds) for LDAP
authentication."
"LDAP_SERVER_URI", "An LDAP URI is a combination of connection protocol
(ldap or ldaps), IP address/hostname and port of the directory server that you
want to connect to. For example, 'ldap://172.16.209.35:389' is a valid
LDAP_SERVER_URI where ldap is the connection protocol, 172.16.209.35 is the IP
address and 389 is the port. Port 636 is used for the ldaps communication protocol."
"LDAP_USERNAME_ATTRIBUTE","Specifies the LDAP attribute that contains the
usernames. For LDAP authentication, you need to enter the value of that
particular attribute as username. For example, if you set the value of
LDAP_USERNAME_ATTRIBUTE as ‘cn’ and you have defined 'cn=admin' in your LDAP server
entries, you should be able to authenticate by entering ‘admin’ in the 
*Email Address / Username* field and its corresponding password in the *Password* 
field."
"LDAP_SEARCH_BASE_DN","Specifies the distinguished name (DN) for the top-most user
directory that you want to search. You can use this parameter for limiting the search
request to a specific group of users. For example, if you want to search only within
the Organizational Unit named sales, you can define the value for LDAP_SEARCH_BASE_DN
parameter as following:
LDAP_SEARCH_BASE_DN = ‘ou=sales,dc=example,dc=com'
This is an optional parameter only while binding as pgAdmin user.
If you do not specify any value for LDAP_SEARCH_BASE_DN, then the value for
LDAP_BASE_DN will be considered for the same."
"LDAP_SEARCH_FILTER","Defines the criteria to retrieve matching entries in an
LDAP search request. For example, LDAP_SEARCH_FILTER = '(objectclass=HR)’ setting
searches only for users having HR as their objectClass attribute."
"LDAP_SEARCH_SCOPE","Indicates the set of entries at or below the Base DN that
maybe considered as potential matches for a search request. You can specify the
scope of a search as either a *base*, *level*, or *subtree* search. A *base* search
limits the search to the base object. A *level* search is restricted to the immediate
children of a base object, but excludes the base object itself. A *subtree* search
includes all child objects as well as the base object."
"LDAP_USE_STARTTLS","Specifies if you want to use Transport Layer Security (TLS)
for secure communication between LDAP clients and LDAP servers. If you specify
the connection protocol in *LDAP_SERVER_URI* as *ldaps*, this parameter is ignored."
"LDAP_CA_CERT_FILE","Specifies the path to the trusted CA certificate file. This
parameter is applicable only if you are using *ldaps* as connection protocol and
you have set *LDAP_USE_STARTTLS* parameter to *True*."
"LDAP_CERT_FILE","Specifies the path to the server certificate file. This parameter
is applicable only if you are using *ldaps* as connection protocol and you have
set *LDAP_USE_STARTTLS* parameter to *True*."
"LDAP_KEY_FILE","Specifies the path to the server private key file. This parameter
is applicable only if you are using *ldaps* as connection protocol and you have
set *LDAP_USE_STARTTLS* parameter to *True*."
"**Bind as pgAdmin user**"
"LDAP_BASE_DN","Specifies the base DN from where a server will start the search
for users. For example, an LDAP search for any user will be performed by the server
starting at the base DN (dc=example,dc=com). When the base DN matches, the full
DN (cn=admin,dc=example,dc=com) is used to bind with the supplied password."
"**Anonymous bind**"
"LDAP_ANONYMOUS_BIND","Set this parameter to *True* for anonymous binding.
After the connection is made, the pgadmin login user will be further authenticated
by the username and password provided at the login screen."
"**Dedicated user bind**"
"LDAP_BIND_USER", "The account of the user to log in for simple bind.
Set this parameter to allow the connection to bind using a dedicated user.
After the connection is made, the pgadmin login user will be further
authenticated by the username and password provided at the login screen.
at the login screen."
"LDAP_BIND_PASSWORD", "Password for simple bind.
Specify the value if you have set the LDAP_BIND_USER parameter."
+47 -17
View File
@@ -4,57 +4,87 @@
`Event Trigger Dialog`:index:
*****************************
Use the *Domain Trigger* dialog to define an event trigger. Unlike regular triggers, which are attached to a single table and capture only DML events, event triggers are global to a particular database and are capable of capturing DDL events. Like regular triggers, event triggers can be written in any procedural language that includes event trigger support, or in C, but not in SQL.
Use the *Domain Trigger* dialog to define an event trigger. Unlike regular
triggers, which are attached to a single table and capture only DML events,
event triggers are global to a particular database and are capable of capturing
DDL events. Like regular triggers, event triggers can be written in any
procedural language that includes event trigger support, or in C, but not in
SQL.
The *Domain Trigger* dialog organizes the development of a event trigger through the following dialog tabs: *General*, *Definition*, and *Security Labels*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Domain Trigger* dialog organizes the development of a event trigger through
the following dialog tabs: *General*, *Definition*, and *Security Labels*. The
*SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/event_trigger_general.png
:alt: Event trigger dialog general tab
:align: center
Use the fields in the *General* tab to identify the event trigger:
* Use the *Name* field to add a descriptive name for the event trigger. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to specify the owner of the event trigger.
* Use the *Name* field to add a descriptive name for the event trigger. The name
will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to specify the owner of the event
trigger.
* Store notes about the event trigger in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/event_trigger_definition.png
:alt: Event trigger dialog definition tab
:align: center
Use the fields in the *Definition* tab to define the event trigger:
* Select a radio button in the *Enabled Status* field to specify a status for the trigger: *Enable* *Disable*, *Replica* *Always*.
* Use the drop-down listbox next to *Trigger function* to specify an existing function. A trigger function takes an empty argument list, and returns a value of type event_trigger.
* Select a radio button in the *Events* field to specify when the event trigger will fire: *DDL COMMAND START*, *DDL COMMAND END*, or *SQL DROP*.
* Use the *When* field to write a condition for the event trigger that must be satisfied before the event trigger can execute.
* Select a value from the drop down of *Trigger Enabled* field to specify a status
for the trigger: *Enable* *Disable*, *Replica* *Always*.
* Use the drop-down listbox next to *Trigger function* to specify an existing
function. A trigger function takes an empty argument list, and returns a
value of type event_trigger.
* Select a value from the drop down of *Events* field to specify when the event
trigger will fire: *DDL COMMAND START*, *DDL COMMAND END*, or *SQL DROP*.
* Use the *When TAG in* field to enter filter values for TAG for which the trigger
will be executed. The values must be in single quotes separated by comma.
Click the *Security Labels* tab to continue.
.. image:: images/event_trigger_security.png
:alt: Event trigger dialog security tab
:align: center
Use the *Security* tab to define security labels applied to the trigger. Click the *Add* icon (+) to add each security label.
Use the *Security* tab to define security labels applied to the trigger. Click
the *Add* icon (+) to add each security 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 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.
* 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 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 the *Add* icon (+) 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 *Add* icon (+) 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 *Domain Trigger* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
Your entries in the *Domain Trigger* dialog generate a generate a SQL command.
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.
**Example**
Example
*******
The following is an example of the sql command generated by user selections in the *Domain Trigger* dialog:
The following is an example of the sql command generated by user selections in
the *Domain Trigger* dialog:
.. image:: images/event_trigger_sql.png
:alt: Event trigger dialog sql tab
:align: center
The command creates an event trigger named *accounts* that invokes the procedure named *acct_due*.
The command creates an event trigger named *accounts* that invokes the procedure
named *acct_due*.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+57 -22
View File
@@ -1,69 +1,104 @@
.. _exclusion_constraint_dialog:
************************************
`Exclusion constraint Dialog`:index:
`Exclusion Constraint Dialog`:index:
************************************
Use the *Exclusion constraint* dialog to define or modify the behavior of an exclusion constraint. An exclusion constraint guarantees that if any two rows are compared on the specified column or expression (using the specified operator), at least one of the operator comparisons will return false or null.
Use the *Exclusion constraint* dialog to define or modify the behavior of an
exclusion constraint. An exclusion constraint guarantees that if any two rows
are compared on the specified column or expression (using the specified
operator), at least one of the operator comparisons will return false or null.
The *Exclusion constraint* dialog organizes the development of an exclusion constraint through the following dialog tabs: *General*, *Definition*, and *Columns*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Exclusion constraint* dialog organizes the development of an exclusion
constraint through the following dialog tabs: *General*, *Definition*, and
*Columns*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/exclusion_constraint_general.png
:alt: Exclusion constraint dialog general tab
:align: center
Use the fields in the *General* tab to identify the exclusion constraint:
* Use the *Name* field to provide a descriptive name for the exclusion constraint. The name will be displayed in the *pgAdmin* tree control.
* Use the *Name* field to provide a descriptive name for the exclusion
constraint. The name will be displayed in the *pgAdmin* tree control.
Click the *Definition* tab to continue.
.. image:: images/exclusion_constraint_definition.png
:alt: Exclusion constraint dialog definition tab
:align: center
Use the fields in the *Definition* tab to define the exclusion constraint:
* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index associated with the exclude constraint will reside.
* Use the drop-down listbox next to *Access method* to specify the type of index that will be used when implementing the exclusion constraint:
* Use the drop-down listbox next to *Tablespace* to select the tablespace in
which the index associated with the exclude constraint will reside.
* Use the drop-down listbox next to *Access method* to specify the type of
index that will be used when implementing the exclusion constraint:
* Select *gist* to specify a GiST index.
* Select *spgist* to specify a space-partitioned GiST index.
* Select *btree* to specify a B-tree index.
* Select *hash* to specify a hash index.
* Use the *Fill Factor* field to specify a fill factor for the table and associated index. The fill factor is a percentage between 10 and 100. 100 (complete packing) is the default.
* Move the *Deferrable?* switch to the *Yes* position to specify that the timing of the constraint is deferrable, and can be postponed until the end of the statement. The default is *No*.
* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*.
* Use the *Constraint* field to provide a condition that a row must satisfy to be included in the table.
* Use the *Fill Factor* field to specify a fill factor for the table and
associated index. The fill factor is a percentage between 10 and 100. 100
(complete packing) is the default.
* Move the *Deferrable?* switch to the *Yes* position to specify that the
timing of the constraint is deferrable, and can be postponed until the end of
the statement. The default is *No*.
* If enabled, move the *Deferred?* switch to the *Yes* position to specify the
timing of the constraint is deferred to the end of the statement. The default
is *No*.
* Use the *Constraint* field to provide a condition that a row must satisfy to
be included in the table.
Click the *Columns* tab to continue.
.. image:: images/exclusion_constraint_columns.png
:alt: Exclusion constraint dialog columns tab
:align: center
Use the fields in the *Columns* tab to to specify the column(s) to which the constraint applies. Use the drop-down listbox next to *Column* to select a column and click the *Add* icon (+) to provide details of the action on the column:
Use the fields in the *Columns* tab to to specify the column(s) to which the
constraint applies. Use the drop-down listbox next to *Column* to select a
column and click the *Add* icon (+) to provide details of the action on the
column:
* The *Column* field is populated with the selection made in the *Column* drop-down listbox.
* If applicable, use the drop-down listbox in the *Operator class* to specify the operator class that will be used by the index for the column.
* Move the *DESC* switch to *DESC* to specify a descending sort order. The default is *ASC* which specifies an ascending sort order.
* Use the *NULLs order* column to specify the placement of NULL values (when sorted). Specify *FIRST* or *LAST*.
* Use the drop-down list next to *Operator* to specify a comparison or conditional operator.
* The *Column* field is populated with the selection made in the *Column*
drop-down listbox.
* If applicable, use the drop-down listbox in the *Operator class* to specify
the operator class that will be used by the index for the column.
* Move the *DESC* switch to *DESC* to specify a descending sort order. The
default is *ASC* which specifies an ascending sort order.
* Use the *NULLs order* column to specify the placement of NULL values (when
sorted). Specify *FIRST* or *LAST*.
* Use the drop-down list next to *Operator* to specify a comparison or
conditional operator.
Use *Include columns* field to specify columns for *INCLUDE* clause of the constraint. This option is available in Postgres 11 and later.
Use *Include columns* field to specify columns for *INCLUDE* clause of the
constraint. This option is available in Postgres 11 and later.
Click the *SQL* tab to continue.
Your entries in the *Exclusion Constraint* 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.
Your entries in the *Exclusion Constraint* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Exclusion Constraint* dialog:
The following is an example of the sql command generated by user selections in
the *Exclusion Constraint* dialog:
.. image:: images/exclusion_constraint_sql.png
:alt: Exclusion constraint dialog sql tab
:align: center
The example shown demonstrates creating an exclusion constraint named *exclude_department* that restricts additions to the dept table to those additions that are not equal to the value of the *deptno* column. The constraint uses a btree index.
The example shown demonstrates creating an exclusion constraint named
*exclude_department* that restricts additions to the dept table to those
additions that are not equal to the value of the *deptno* column. The
constraint uses a btree index.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+28 -10
View File
@@ -4,42 +4,60 @@
`Extension Dialog`:index:
*************************
Use the *Extension* dialog to install a new extension into the current database. An extension is a collection of SQL objects that add targeted functionality to your Postgres installation. The *Extension* dialog adds the functionality of an extension to the current database only; you must register the extension in each database that use the extension. Before you load an extension into a database, you should confirm that any pre-requisite files are installed.
Use the *Extension* dialog to install a new extension into the current database.
An extension is a collection of SQL objects that add targeted functionality to
your Postgres installation. The *Extension* dialog adds the functionality of
an extension to the current database only; you must register the extension in
each database that use the extension. Before you load an extension into a
database, you should confirm that any pre-requisite files are installed.
The *Extension* dialog allows you to implement options of the CREATE EXTENSION command through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Extension* dialog allows you to implement options of the CREATE EXTENSION
command through the following dialog tabs: *General* and *Definition*. The *SQL*
tab displays the SQL code generated by dialog selections.
.. image:: images/extension_general.png
:alt: Extension dialog general tab
:align: center
Use the fields in the *General* tab to identify an extension:
* Use the drop-down listbox in the *Name* field to select the extension. Each extension must have a unique name.
* Use the drop-down listbox in the *Name* field to select the extension. Each
extension must have a unique name.
* Store notes about the extension in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/extension_definition.png
:alt: Extension dialog definition tab
:align: center
Use the *Definition* tab to select the *Schema* and *Version*:
* Use the drop-down listbox next to *Schema* to select the name of the schema in which to install the extension's objects.
* Use the drop-down listbox next to *Version* to select the version of the extension to install.
* Use the drop-down listbox next to *Schema* to select the name of the schema
in which to install the extension's objects.
* Use the drop-down listbox next to *Version* to select the version of the
extension to install.
Click the *SQL* tab to continue.
Your entries in the *Extension* 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.
Your entries in the *Extension* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Extension* dialog:
The following is an example of the sql command generated by user selections in
the *Extension* dialog:
.. image:: images/extension_sql.png
:alt: Extension dialog sql tab
:align: center
The command creates the *chkpass* extension in the *public* schema. It is version *1.0* of *chkpass*.
The command creates the *chkpass* extension in the *public* schema. It is
version *1.0* of *chkpass*.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+53 -20
View File
@@ -4,72 +4,105 @@
`Foreign Data Wrapper Dialog`:index:
************************************
Use the *Foreign Data Wrapper* dialog to create or modify a foreign data wrapper. A foreign data wrapper is an adapter between a Postgres database and data stored on another data source.
Use the *Foreign Data Wrapper* dialog to create or modify a foreign data
wrapper. A foreign data wrapper is an adapter between a Postgres database and
data stored on another data source.
You must be a superuser to create a foreign data wrapper.
The *Foreign Data Wrapper* dialog organizes the development of a foreign data wrapper through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Foreign Data Wrapper* dialog organizes the development of a foreign data
wrapper through the following dialog tabs: *General*, *Definition*, *Options*,
and *Security*. The *SQL* tab displays the SQL code generated by dialog
selections.
.. image:: images/foreign_data_wrapper_general.png
:alt: Foreign data wrapper dialog general tab
:align: center
Use the fields in the *General* tab to identify the foreign data wrapper:
* Use the *Name* field to add a descriptive name for the foreign data wrapper. A foreign data wrapper name must be unique within the database. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the foreign data wrapper.
* Use the *Name* field to add a descriptive name for the foreign data wrapper.
A foreign data wrapper name must be unique within the database. The name will
be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select the name of the role that
will own the foreign data wrapper.
* Store notes about the foreign data wrapper in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/foreign_data_wrapper_definition.png
:alt: Foreign data wrapper dialog definition tab
:align: center
Use the fields in the *Definition* tab to set parameters:
* Select the name of the handler function from the drop-down listbox in the *Handler* field. This is the name of an existing function that will be called to retrieve the execution functions for foreign tables.
* Select the name of the validator function from the drop-down listbox in the *Validator* field. This is the name of an existing function that will be called to check the generic options given to the foreign data wrapper, as well as options for foreign servers, user mappings and foreign tables using the foreign data wrapper.
* Select the name of the handler function from the drop-down listbox in the
*Handler* field. This is the name of an existing function that will be called
to retrieve the execution functions for foreign tables.
* Select the name of the validator function from the drop-down listbox in the
*Validator* field. This is the name of an existing function that will be
called to check the generic options given to the foreign data wrapper, as
well as options for foreign servers, user mappings and foreign tables using
the foreign data wrapper.
Click the *Options* tab to continue.
.. image:: images/foreign_data_wrapper_options.png
:alt: Foreign data wrapper dialog options tab
:align: center
Use the fields in the *Options* tab to specify options:
* Click the the *Add* icon (+) button to add an option/value pair for the foreign data wrapper. Supported option/value pairs will be specific to the selected foreign data wrapper.
* Specify the option name in the *Option* field and provide a corresponding value in the *Value* field.
* Click the the *Add* icon (+) button to add an option/value pair for the
foreign data wrapper. Supported option/value pairs will be specific to the
selected foreign data wrapper.
* Specify the option name in the *Option* field and provide a corresponding
value in the *Value* field.
Click the *Add* icon (+) to specify each additional 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 *Add* icon (+) to specify each additional 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 *Security* tab to continue.
.. image:: images/foreign_data_wrapper_security.png
:alt: Foreign data wrapper dialog security tab
:align: center
Use the *Security* tab to assign security privileges. Click the *Add* icon (+) to assign a set of privileges.
Use the *Security* tab to assign security privileges. Click the *Add* icon (+)
to 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 granting the privileges from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the foreign data wrapper.
* 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.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
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.
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.
Click the *SQL* tab to continue.
Your entries in the *Foreign Data Wrapper* 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.
Your entries in the *Foreign Data Wrapper* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Foreign Data Wrapper* dialog:
The following is an example of the sql command generated by user selections in
the *Foreign Data Wrapper* dialog:
.. image:: images/foreign_data_wrapper_sql.png
:alt: Foreign data wrapper dialog sql tab
:align: center
The example creates a foreign data wrapper named *libpq_debug* that uses pre-existing validator and handler functions, *dblink_fdw_validator* and *libpg_fdw_handler*. Selections on the *Options* tab set *debug* equal to *true*. The foreign data wrapper is owned by *postgres*.
The example creates a foreign data wrapper named *libpq_debug* that uses
pre-existing validator and handler functions, *dblink_fdw_validator* and
*libpg_fdw_handler*. Selections on the *Options* tab set *debug* equal to
*true*. The foreign data wrapper is owned by *postgres*.
* Click the *Help* button (?) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
* Click the *Help* button (?) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+67 -24
View File
@@ -4,58 +4,94 @@
`Foreign key Dialog`:index:
***************************
Use the *Foreign key* dialog to specify the behavior of a foreign key constraint. A foreign key constraint maintains referential integrity between two tables. A foreign key constraint cannot be defined between a temporary table and a permanent table.
Use the *Foreign key* dialog to specify the behavior of a foreign key
constraint. A foreign key constraint maintains referential integrity between
two tables. A foreign key constraint cannot be defined between a temporary
table and a permanent table.
The *Foreign key* dialog organizes the development of a foreign key constraint through the following dialog tabs: *General*, *Definition*, *Columns*, and *Action*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Foreign key* dialog organizes the development of a foreign key constraint
through the following dialog tabs: *General*, *Definition*, *Columns*, and
*Action*. The *SQL* tab displays the SQL code generated by dialog selections.
.. image:: images/foreign_key_general.png
:alt: Foreign key dialog general tab
:align: center
Use the fields in the *General* tab to identify the foreign key constraint:
* Use the *Name* field to add a descriptive name for the foreign key. The name will be displayed in the *pgAdmin* tree control.
* Use the *Name* field to add a descriptive name for the foreign key. The name
will be displayed in the *pgAdmin* tree control.
* Store notes about the foreign key constraint in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/foreign_key_definition.png
:alt: Foreign key dialog definition tab
:align: center
Use the fields in the *Definition* tab to define the foreign key constraint:
* Move the *Deferrable?* switch to the *Yes* position to specify the timing of the constraint is deferrable and can be postponed until the end of the statement. The default is *No*.
* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*.
* Move the *Match type* switch specify the type of matching that is enforced by the constraint:
* Move the *Deferrable?* switch to the *Yes* position to specify the timing of
the constraint is deferrable and can be postponed until the end of the
statement. The default is *No*.
* If enabled, move the *Deferred?* switch to the *Yes* position to specify the
timing of the constraint is deferred to the end of the statement. The default
is *No*.
* Move the *Match type* switch specify the type of matching that is enforced by
the constraint:
* Select *Full* to indicate that all columns of a multicolumn foreign key must be null if any column is null; if all columns are null, the row is not required to have a match in the referenced table.
* Select *Simple* to specify that a single foreign key column may be null; if any column is null, the row is not required to have a match in the referenced table.
* Select *Full* to indicate that all columns of a multicolumn foreign key
must be null if any column is null; if all columns are null, the row is
not required to have a match in the referenced table.
* Select *Simple* to specify that a single foreign key column may be null;
if any column is null, the row is not required to have a match in the
referenced table.
* Move the *Validated* switch to the *Yes* position to instruct the server to validate the existing table content (against a foreign key or check constraint) when you save modifications to this dialog.
* Move the *Auto FK Index* switch to the *No* position to disable the automatic index feature.
* The field next to *Covering Index* generates the name of an index if the *Auto FK Index* switch is in the *Yes* position; or, this field is disabled.
* Move the *Validated* switch to the *Yes* position to instruct the server to
validate the existing table content (against a foreign key or check
constraint) when you save modifications to this dialog.
* Move the *Auto FK Index* switch to the *No* position to disable the automatic
index feature.
* The field next to *Covering Index* generates the name of an index if the *Auto
FK Index* switch is in the *Yes* position; or, this field is disabled.
Click the *Columns* tab to continue.
.. image:: images/foreign_key_columns.png
:alt: Foreign key dialog columns tab
:align: center
Use the fields in the *Columns* tab to specify one or more reference column(s). A Foreign Key constraint requires that one or more columns of a table must only contain values that match values in the referenced column(s) of a row of a referenced table:
Use the fields in the *Columns* tab to specify one or more reference column(s).
A Foreign Key constraint requires that one or more columns of a table must only
contain values that match values in the referenced column(s) of a row of a
referenced table:
* Use the drop-down listbox next to *Local column* to specify the column in the current table that will be compared to the foreign table.
* Use the drop-down listbox next to *References* to specify the name of the table in which the comparison column(s) resides.
* Use the drop-down listbox next to *Referencing* to specify a column in the foreign table.
* Use the drop-down listbox next to *Local column* to specify the column in the
current table that will be compared to the foreign table.
* Use the drop-down listbox next to *References* to specify the name of the
table in which the comparison column(s) resides.
* Use the drop-down listbox next to *Referencing* to specify a column in the
foreign table.
Click the *Add* icon (+) to add a column to the list; repeat the steps above and click the *Add* icon (+) to add additional columns. To discard an entry, click the trash icon to the left of the entry and confirm deletion in the *Delete Row* popup.
Click the *Add* icon (+) to add a column to the list; repeat the steps above and
click the *Add* icon (+) to add additional columns. To discard an entry, click
the trash icon to the left of the entry and confirm deletion in the *Delete Row*
popup.
Click the *Action* tab to continue.
.. image:: images/foreign_key_action.png
:alt: Foreign key dialog action tab
:align: center
Use the drop-down listboxes on the *Action* tab to specify behavior related to the foreign key constraint that will be performed when data within the table is updated or deleted:
Use the drop-down listboxes on the *Action* tab to specify behavior related to
the foreign key constraint that will be performed when data within the table is
updated or deleted:
* Use the drop-down listbox next to *On update* to select an action that will be performed when data in the table is updated.
* Use the drop-down listbox next to *On delete* to select an action that will be performed when data in the table is deleted.
* Use the drop-down listbox next to *On update* to select an action that will be
performed when data in the table is updated.
* Use the drop-down listbox next to *On delete* to select an action that will be
performed when data in the table is deleted.
The supported actions are:
@@ -78,18 +114,25 @@ The supported actions are:
Click the *SQL* tab to continue.
Your entries in the *Foreign key* 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.
Your entries in the *Foreign key* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Foreign key* dialog:
The following is an example of the sql command generated by user selections in
the *Foreign key* dialog:
.. image:: images/foreign_key_sql.png
:alt: Foreign key dialog sql tab
:align: center
The example shown demonstrates creating a foreign key constraint named *territory_fkey* that matches values in the *distributors* table *territory* column with those of the *sales_territories* table *region* column.
The example shown demonstrates creating a foreign key constraint named
*territory_fkey* that matches values in the *distributors* table *territory*
column with those of the *sales_territories* table *region* column.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+40 -14
View File
@@ -4,16 +4,25 @@
`Foreign Server Dialog`:index:
******************************
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.
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.
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
:alt: Foreign server dialog general tab
:align: center
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 *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.
@@ -21,6 +30,7 @@ Click the *Definition* tab to continue.
.. image:: images/foreign_server_definition.png
:alt: Foreign server dialog definition tab
:align: center
Use the fields in the *Definition* tab to set parameters:
@@ -31,41 +41,57 @@ Click the *Options* tab to continue.
.. image:: images/foreign_server_options.png
:alt: Foreign server dialog options tab
:align: center
Use the fields in the *Options* tab to specify options. Click the *Add* button to create an option clause for the foreign server.
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 *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
:alt: Foreign server dialog security tab
:align: center
Use the *Security* tab to assign security privileges to the foreign server. Click *Add* before you assign a set of privileges.
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 inside the *Privileges* field. Check the boxes to the left of one or
more privileges to grant the selected privileges to the specified user.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* 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 *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.
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**
Example
*******
The following is an example of the sql command generated by user selections in the *Foreign Server* dialog:
The following is an example of the sql command generated by user selections in
the *Foreign Server* dialog:
.. image:: images/foreign_server_sql.png
:alt: Foreign server dialog sql tab
:align: center
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.
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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+91 -35
View File
@@ -4,107 +4,163 @@
`Foreign Table Dialog`:index:
*****************************
Use the *Foreign Table* dialog to define a foreign table in the current database. Foreign tables define the structure of an external data source that resides on a foreign server.
Use the *Foreign Table* dialog to define a foreign table in the current
database. Foreign tables define the structure of an external data source that
resides on a foreign server.
The *Foreign Table* dialog organizes the development of a foreign table through the following dialog tabs: *General*, *Definition*, *Columns*, *Constraints*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Foreign Table* dialog organizes the development of a foreign table through
the following dialog tabs: *General*, *Definition*, *Columns*, *Constraints*,
*Options*, and *Security*. The *SQL* tab displays the SQL code generated by
dialog selections.
.. image:: images/foreign_table_general.png
:alt: Foreign table dialog general tab
:align: center
Use the fields in the *General* tab to identify the foreign table:
* Use the *Name* field to add a descriptive name for the foreign table. The name of the foreign table must be distinct from the name of any other foreign table, table, sequence, index, view, existing data type, or materialized view in the same schema. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the foreign table.
* Select the name of the schema in which the foreign table will reside from the drop-down listbox in the *Schema* field.
* Use the *Name* field to add a descriptive name for the foreign table. The name
of the foreign table must be distinct from the name of any other foreign
table, table, sequence, index, view, existing data type, or materialized view
in the same schema. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select the name of the role that
will own the foreign table.
* Select the name of the schema in which the foreign table will reside from the
drop-down listbox in the *Schema* field.
* Store notes about the foreign table in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/foreign_table_definition.png
:alt: Foreign table dialog definition tab
:align: center
Use the fields in the *Definition* tab to define the external data source:
* Use the drop-down listbox next to *Foreign server* to select a foreign server. This list is populated with servers defined through the *Foreign Server* dialog.
* Use the drop-down listbox next to *Inherits* to specify a parent table. The foreign table will inherit all of its columns. This field is optional.
* Use the drop-down listbox next to *Foreign server* to select a foreign server.
This list is populated with servers defined through the *Foreign Server*
dialog.
* Use the drop-down listbox next to *Inherits* to specify a parent table. The
foreign table will inherit all of its columns. This field is optional.
Click the *Columns* tab to continue.
.. image:: images/foreign_table_columns.png
:alt: Foreign table dialog columns tab
:align: center
Use the fields in the *Columns* tab to to add columns and their attributes to the table. Click the *Add* icon (+) to define a column:
Use the fields in the *Columns* tab to to add columns and their attributes to
the table. Click the *Add* icon (+) to define a column:
* Use the *Name* field to add a descriptive name for the column.
* Use the drop-down listbox in the *Data Type* field to select a data type for the column. This can include array specifiers. For more information on which data types are supported by PostgreSQL, refer to Chapter 8 of the core documentation.
* Use the drop-down listbox in the *Data Type* field to select a data type for
the column. This can include array specifiers. For more information on which
data types are supported by PostgreSQL, refer to Chapter 8 of the core
documentation.
Click the *Add* icon (+) to specify each additional column; to discard a column, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Click the *Add* icon (+) to specify each additional column; to discard a column,
click the trash icon to the left of the row and confirm deletion in the *Delete
Row* popup.
Click the *Constraints* tab to continue.
.. image:: images/foreign_table_constraints.png
:alt: Foreign table dialog constraints tab
:align: center
Use the fields in the *Constraints* tab to apply a table constraint to the foreign table. Click the *Add* icon (+) to define a constraint:
Use the fields in the *Constraints* tab to apply a table constraint to the
foreign table. Click the *Add* icon (+) to define a constraint:
* Use the *Name* field to add a descriptive name for the constraint. If the constraint is violated, the constraint name is present in error messages, so constraint names like *col must be positive* can be used to communicate helpful information.
* Use the *Check* field to write a check expression producing a Boolean result. Each row in the foreign table is expected to satisfy the check expression.
* Check the *No Inherit* checkbox to specify that the constraint will not propagate to child tables.
* Uncheck the *Validate* checkbox to disable validation. The database will not assume that the constraint holds for all rows in the table.
* Use the *Name* field to add a descriptive name for the constraint. If the
constraint is violated, the constraint name is present in error messages, so
constraint names like *col must be positive* can be used to communicate
helpful information.
* Use the *Check* field to write a check expression producing a Boolean result.
Each row in the foreign table is expected to satisfy the check expression.
* Check the *No Inherit* checkbox to specify that the constraint will not
propagate to child tables.
* Uncheck the *Validate* checkbox to disable validation. The database will not
assume that the constraint holds for all rows in the table.
Click the *Add* icon (+) to specify each additional constraint; to discard a constraint, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
Click the *Add* icon (+) to specify each additional constraint; to discard a
constraint, click the trash icon to the left of the row and confirm deletion in
he *Delete Row* popup.
Click the *Options* tab to continue.
.. image:: images/foreign_table_options.png
:alt: Foreign table dialog options tab
:align: center
Use the fields in the *Options* tab to specify options to be associated with the new foreign table or one of its columns; the accepted option names and values are specific to the foreign data wrapper associated with the foreign server. Click the *Add* icon (+) to add an option/value pair.
Use the fields in the *Options* tab to specify options to be associated with
the new foreign table or one of its columns; the accepted option names and
values are specific to the foreign data wrapper associated with the foreign
server. Click the *Add* icon (+) to add an option/value pair.
* Specify the option name in the *Option* field. Duplicate option names are not allowed.
* Specify the option name in the *Option* field. Duplicate option names are not
allowed.
* Provide a corresponding value in the *Value* field.
Click the *Add* icon (+) 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 *Add* icon (+) 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 *Security* tab to continue.
.. image:: images/foreign_table_security.png
:alt: Foreign table dialog security tab
:align: center
Use the *Security* tab to assign privileges and define security labels.
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon (+) to set privileges for database objects:
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon
(+) to set privileges for database objects:
* Select the name of the role to which privileges will be assigned 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 owns the foreign table from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the database.
* Select the name of the role to which privileges will be assigned 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.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
Click the *Add* icon (+) 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.
Click the *Add* icon (+) 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 function. Click the *Add* icon (+) to add each security label selection:
Use the *Security Labels* panel to define security labels applied to the
function. Click the *Add* icon (+) 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.
* 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 the *Add* icon (+) 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 *Add* icon (+) 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 *Foreign Table* 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.
Your entries in the *Foreign Table* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *Foreign Table* dialog:
The following is an example of the sql command generated by user selections in
the *Foreign Table* dialog:
.. image:: images/foreign_table_sql.png
:alt: Foreign table dialog sql tab
:align: center
The example shown demonstrates creating a foreign table *weblogs* with multiple columns and two options.
The example shown demonstrates creating a foreign table *weblogs* with multiple
columns and two options.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+32 -13
View File
@@ -1,39 +1,50 @@
.. _fts_configuration_dialog:
*********************************
`FTS Configuration dialog`:index:
`FTS Configuration Dialog`:index:
*********************************
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.
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.
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
:alt: FTS configuration dialog general tab
:align: center
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.
* 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
:alt: FTS configuration dialog definition tab
:align: center
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 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
:alt: FTS configuration dialog tokens tab
:align: center
Use the fields in the *Tokens* tab to add a token:
@@ -41,22 +52,30 @@ Use the fields in the *Tokens* tab to add a token:
* Click the *Add* icon (+) to create a token.
* Use the *Dictionaries* 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.
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.
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**
Example
*******
The following is an example of the sql command generated by user selections in the *FTS Configuration* dialog:
The following is an example of the sql command generated by user selections in
the *FTS Configuration* dialog:
.. image:: images/fts_configuration_sql.png
:alt: FTS configuration dialog sql tab
:align: center
The example shown demonstrates creating a FTS configuration named *meme_phrases*. It uses the *default* parser.
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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+68 -18
View File
@@ -4,59 +4,109 @@
`FTS Dictionary Dialog`:index:
******************************
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.
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.
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
:alt: FTS dictionary dialog general tab
:align: center
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 the role that will own the FTS Dictionary.
* Select the name of the schema in which the dictionary will reside from the drop-down listbox in the *Schema* field.
* 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 the role that will own the
FTS Dictionary.
* 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
:alt: FTS dictionary dialog definition tab
:align: center
Use the field in the *Definition* tab to choose a template from the drop-down listbox:
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.
* 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
:alt: FTS dictionary dialog options tab
:align: center
Use the fields in the *Options* tab to provide template-specific options. Click the *Add* icon (+) to add an option clause:
Use the fields in the *Options* tab to provide template-specific options. Click
the *Add* icon (+) to add an option clause:
* Specify the name of an option in the *Option* field
* Provide a value for the option in the *Value* field.
Click the *Add* icon (+) 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 *Add* icon (+) 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. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
Your entries in the *FTS Dictionary* dialog generate a generate a SQL command.
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.
**Example**
Example
*******
The following is an example of the sql command generated by user selections in the *FTS Dictionary* dialog:
The following is an example of the sql command generated by user selections in
the *FTS Dictionary* dialog:
.. image:: images/fts_dictionary_sql.png
:alt: FTS dictionary dialog sql tab
:align: center
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.
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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+30 -11
View File
@@ -4,40 +4,59 @@
`FTS Parser Dialog`:index:
**************************
Use the *FTS Parser* dialog to create a new text search parser. A text search parser defines a method for splitting a text string into tokens and assigning types (categories) to the tokens.
Use the *FTS Parser* dialog to create a new text search parser. A text search
parser defines a method for splitting a text string into tokens and assigning
types (categories) to the tokens.
The *FTS Parser* dialog organizes the development of a text search parser through the following dialog tabs: *General*, and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
The *FTS Parser* dialog organizes the development of a text search parser
through the following dialog tabs: *General*, and *Definition*. The *SQL* tab
displays the SQL code generated by dialog selections.
.. image:: images/fts_parser_general.png
:alt: FTS parser dialog general tab
:align: center
Use the fields in the *General* tab to identify a text search parser:
* Use the *Name* field to add a descriptive name for the parser. The name will be displayed in the *pgAdmin* tree control.
* Select the name of the schema in which the parser will reside from the drop-down listbox in the *Schema* field.
* Use the *Name* field to add a descriptive name for the parser. The name will
be displayed in the *pgAdmin* tree control.
* Select the name of the schema in which the parser 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/fts_parser_definition.png
:alt: FTS parser dialog definition tab
:align: center
Use the fields in the *Definition* tab to define parameters:
* Use the drop-down listbox next to *Start function* to select the name of the function that will initialize the parser.
* Use the drop-down listbox next to *Get next token function* to select the name of the function that will return the next token.
* Use the drop-down listbox next to *End function* to select the name of the function that is called when the parser is finished.
* Use the drop-down listbox next to *Lextypes function* to select the name of the lextypes function for the parser. The lextypes function returns an array that contains the id, alias, and a description of the tokens used by the parser.
* Use the drop-down listbox next to *Headline function* to select the name of the headline function for the parser. The headline function returns an excerpt from the document in which the terms of the query are highlighted.
* Use the drop-down listbox next to *Start function* to select the name of the
function that will initialize the parser.
* Use the drop-down listbox next to *Get next token function* to select the
name of the function that will return the next token.
* Use the drop-down listbox next to *End function* to select the name of the
function that is called when the parser is finished.
* Use the drop-down listbox next to *Lextypes function* to select the name of
the lextypes function for the parser. The lextypes function returns an array
that contains the id, alias, and a description of the tokens used by the
parser.
* Use the drop-down listbox next to *Headline function* to select the name of
the headline function for the parser. The headline function returns an excerpt
from the document in which the terms of the query are highlighted.
Click the *SQL* tab to continue.
.. image:: images/fts_parser_sql.png
:alt: FTS parser dialog sql tab
:align: center
Your entries in the *FTS Parser* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
Your entries in the *FTS Parser* dialog generate a generate a SQL command. Use
the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL
command.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+26 -11
View File
@@ -4,43 +4,58 @@
`FTS Template Dialog`:index:
****************************
Use the *FTS Template* dialog to create a new text search template. A text search template defines the functions that implement text search dictionaries.
Use the *FTS Template* dialog to create a new text search template. A text
search template defines the functions that implement text search dictionaries.
The *FTS Template* dialog organizes the development of a text search Template through the following dialog tabs: *General*, and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
The *FTS Template* dialog organizes the development of a text search Template
through the following dialog tabs: *General*, and *Definition*. The *SQL* tab
displays the SQL code generated by dialog selections.
.. image:: images/fts_template_general.png
:alt: FTS template dialog general tab
:align: center
Use the fields in the *General* tab to identify a template:
* Use the *Name* field to add a descriptive name for the template. The name will be displayed in the *pgAdmin* tree control.
* Select the name of the schema in which the template will reside from the drop-down listbox in the *Schema* field.
* Use the *Name* field to add a descriptive name for the template. The name will
be displayed in the *pgAdmin* tree control.
* Select the name of the schema in which the template will reside from the
drop-down listbox in the *Schema* field.
* Store notes about the template in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/fts_template_definition.png
:alt: FTS template dialog definition tab
:align: center
Use the fields in the *Definition* tab to define function parameters:
* Use the drop-down listbox next to *Init function* to select the name of the init function for the template. The init function is optional.
* Use the drop-down listbox next to *Lexize function* to select the name of the lexize function for the template. The lexize function is required.
* Use the drop-down listbox next to *Init function* to select the name of the
init function for the template. The init function is optional.
* Use the drop-down listbox next to *Lexize function* to select the name of the
lexize function for the template. The lexize function is required.
Click the *SQL* tab to continue.
Your entries in the *FTS Template* 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.
Your entries in the *FTS Template* 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**
Example
*******
The following is an example of the sql command generated by user selections in the *FTS Template* dialog:
The following is an example of the sql command generated by user selections in
the *FTS Template* dialog:
.. image:: images/fts_template_sql.png
:alt: FTS template dialog sql tab
:align: center
The example shown demonstrates creating a fts template named *ru_template* that uses the ispell dictionary.
The example shown demonstrates creating a fts template named *ru_template* that
uses the ispell dictionary.
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+118 -54
View File
@@ -4,118 +4,182 @@
`Function Dialog`:index:
************************
Use the *Function* dialog to define a function. If you drop and then recreate a function, the new function is not the same entity as the old; you must drop existing rules, views, triggers, etc. that refer to the old function.
Use the *Function* dialog to define a function. If you drop and then recreate
a function, the new function is not the same entity as the old; you must drop
existing rules, views, triggers, etc. that refer to the old function.
The *Function* dialog organizes the development of a function through the following dialog tabs: *General*, *Definition*, *Options*, *Arguments*, *Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
The *Function* dialog organizes the development of a function through the
following dialog tabs: *General*, *Definition*, *Code*, *Options*,
*Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by
dialog selections.
.. image:: images/function_general.png
:alt: Function dialog general tab
:align: center
Use the fields in the *General* tab to identify a function:
* Use the *Name* field to add a descriptive name for the function. The name will be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the function.
* Use the drop-down listbox next to *Schema* to select the schema in which the function will be created.
* Use the *Name* field to add a descriptive name for the function. The name will
be displayed in the *pgAdmin* tree control.
* Use the drop-down listbox next to *Owner* to select the name of the role that
will own the function.
* Use the drop-down listbox next to *Schema* to select the schema in which the
function will be created.
* Store notes about the function in the *Comment* field.
Click the *Definition* tab to continue.
.. image:: images/function_definition.png
:alt: Function dialog definition tab
:align: center
Use the fields in the *Definition* tab to define the function:
* Use the drop-down listbox next to *Return type* to select the data type returned by the function, if any.
* Use the drop-down listbox next to *Language* to select the implementation language. The default is *sql*.
* Use the *Code* field to write the code that will execute when the function is called.
* Use the drop-down listbox next to *Return type* to select the data type
returned by the function, if any.
* Use the drop-down listbox next to *Language* to select the implementation
language. The default is *sql*.
* Use the fields in the *Arguments* to define an argument. Click the *Add*
icon (+) to set parameters and values for the argument:
* Use the drop-down listbox in the *Data type* field to select a data type.
* Use the drop-down listbox in the *Mode* field to select a mode. Select *IN*
for an input parameter; select *OUT* for an output parameter; select *INOUT*
for both an input and an output parameter; or, select *VARIADIC* to specify a
VARIADIC parameter.
* Provide a name for the argument in the *Argument Name* field.
* Specify a default value for the argument in the *Default Value* field.
Click the *Add* icon (+) to define another argument; to discard an argument,
click the trash icon to the left of the row and confirm deletion in the *Delete
Row* popup.
Click the *Code* tab to continue.
.. image:: images/function_code.png
:alt: Function dialog code tab
:align: center
* Use the *Code* field to write the code that will execute when the function
is called.
Click the *Options* tab to continue.
.. image:: images/function_options.png
:alt: Function dialog options tab
:align: center
Use the fields in the *Options* tab to describe or modify the action of the function:
Use the fields in the *Options* tab to describe or modify the action of the
function:
* Use the drop-down listbox next to *Volatility* to select one of the following. *VOLATILE* is the default value.
* Use the drop-down listbox next to *Volatility* to select one of the following.
*VOLATILE* is the default value.
* *VOLATILE* indicates that the function value can change even within a single table scan, so no optimizations can be made.
* *STABLE* indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values.
* *IMMUTABLE* indicates that the function cannot modify the database and always returns the same result when given the same argument values.
* *VOLATILE* indicates that the function value can change even within a
single table scan, so no optimizations can be made.
* *STABLE* indicates that the function cannot modify the database, and that
within a single table scan it will consistently return the same result for
the same argument values.
* *IMMUTABLE* indicates that the function cannot modify the database and
always returns the same result when given the same argument values.
* Move the *Returns a Set?* switch to indicate if the function returns a set that includes multiple rows. The default is *No*.
* Move the *Strict?* switch to indicate if the function always returns NULL whenever any of its arguments are NULL. If *Yes*, the function 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 function is to be executed with the privileges of the user that created it. The default is *No*.
* Move the *Window?* switch to indicate that the function is a window function rather than a plain function. The default is *No*. This is currently only useful for functions written in C. The WINDOW attribute cannot be changed when replacing an existing function definition. For more information about the CREATE FUNCTION command, see the PostgreSQL core documentation available at:
* Move the *Returns a Set?* switch to indicate if the function returns a set
that includes multiple rows. The default is *No*.
* Move the *Strict?* switch to indicate if the function always returns NULL
whenever any of its arguments are NULL. If *Yes*, the function 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 function is to be
executed with the privileges of the user that created it. The default is *No*.
* Move the *Window?* switch to indicate that the function is a window function
rather than a plain function. The default is *No*. This is currently only
useful for functions written in C. The WINDOW attribute cannot be changed when
replacing an existing function definition. For more information about the
CREATE FUNCTION command, see the PostgreSQL core documentation available at:
http://www.postgresql.org/docs/9.5/static/functions-window.html
https://www.postgresql.org/docs/current/functions-window.html
* Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the function, in units of cpu_operator_cost. If the function returns a set, this is the cost per returned row.
* Use the *Estimated rows* field to specify a positive number giving the estimated number of rows that the query planner should expect the function to return. This is only allowed when the function is declared to return a set. The default assumption is 1000 rows.
* Move the *Leak proof?* switch to indicate whether the function has side effects. The default is *No*. This option can only be set by the superuser.
Click the *Arguments* tab to continue.
.. image:: images/function_arguments.png
:alt: Function dialog arguments tab
Use the fields in the *Arguments* tab to define an argument. Click the *Add* icon (+) to set parameters and values for the argument:
* Use the drop-down listbox in the *Data type* field to select a data type.
* Use the drop-down listbox in the *Mode* field to select a mode. Select *IN* for an input parameter; select *OUT* for an output parameter; select *INOUT* for both an input and an output parameter; or, select *VARIADIC* to specify a VARIADIC parameter.
* Provide a name for the argument in the *Argument Name* field.
* Specify a default value for the argument in the *Default Value* field.
Click the *Add* icon (+) to define another argument; to discard an argument, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
* Use the *Estimated cost* field to specify a positive number representing the
estimated execution cost for the function, in units of cpu_operator_cost. If
the function returns a set, this is the cost per returned row.
* Use the *Estimated rows* field to specify a positive number giving the
estimated number of rows that the query planner should expect the function to
return. This is only allowed when the function is declared to return a set.
The default assumption is 1000 rows.
* Move the *Leak proof?* switch to indicate whether the function has side
effects. The default is *No*. This option can only be set by the superuser.
* Use the *Support function* field to specify a planner support function to
use for the function.
Click the *Parameters* tab to continue.
.. image:: images/function_parameters.png
:alt: Function dialog parameters tab
:align: center
Use the fields in the *Parameters* tab to specify settings that will be applied when the function is invoked. Click the *Add* icon (+) to add a *Name*/*Value* field in the table.
Use the fields in the *Parameters* tab to specify settings that will be applied
when the function is invoked. Click the *Add* icon (+) to add a *Name*/*Value*
field in the table.
* Use the drop-down listbox in the *Name* column in the *Parameters* panel to select a parameter.
* Use the *Value* field to specify the value that will be associated with the selected variable. This field is context-sensitive.
* Use the drop-down listbox in the *Name* column in the *Parameters* panel to
select a parameter.
* 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.
.. image:: images/function_security.png
:alt: Function dialog security tab
:align: center
Use the *Security* tab to assign privileges and define security labels.
Use the *Privileges* panel to assign usage privileges for the function to a role.
Use the *Privileges* panel to assign usage privileges for the function to a
role.
* 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 inside the *Privileges* field. Check the boxes to the left of one or
more privileges to grant the selected privilege to the specified user.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
Click the *Add* icon (+) 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.
Click the *Add* icon (+) 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 function. Click the *Add* icon (+) to add each security label selection:
Use the *Security Labels* panel to define security labels applied to the
function. Click the *Add* icon (+) 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.
* 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 the *Add* icon (+) 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 *Add* icon (+) 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 *Function* 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.
Your entries in the *Function* 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**
Example
*******
The following is an example of the sql command generated by selections made in the *Function* dialog:
The following is an example of the sql command generated by selections made in
the *Function* dialog:
.. image:: images/function_sql.png
:alt: Function dialog sql tab
:align: center
The example demonstrates creating an *edbspl* function named *emp_comp*. The function adds two columns (p_sal and p_comm), and then uses the result to compute a yearly salary, returning a NUMERIC value.
The example demonstrates creating an *plpgsql* function named *hire_salesmen*. The
function have three columns (p_ename, p_sal and p_comm).
* 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 *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Cancel* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
+18 -19
View File
@@ -8,7 +8,7 @@ Pre-compiled and configured installation packages for pgAdmin 4 are available
for a number of desktop environments; we recommend using an installer
whenever possible.
In a Server Deployment, the pgAdmin application is deployed behind a webserver
In a *Server Deployment*, the pgAdmin application is deployed behind a webserver
or with the WSGI interface.
If you install pgAdmin in server mode, you will be prompted to provide a role
name and pgAdmin password when you initially connect to pgAdmin. The first
@@ -18,28 +18,25 @@ and manage additional pgAdmin user accounts. When a user authenticates
with pgAdmin, the pgAdmin tree control displays the server definitions
associated with that login role.
Contents:
.. toctree::
server_deployment
pgadmin_login
pgadmin_user
change_user_password
In a Desktop Deployment, the pgAdmin application is configured to use the
In a *Desktop Deployment*, the pgAdmin application is configured to use the
desktop runtime environment to host the program on a supported platform.
Typically, users will install a pre-built package to run pgAdmin in desktop
mode, but a manual desktop deployment can be installed and though it is more
difficult to setup, it may be useful for developers interested in understanding
how pgAdmin works.
Contents:
It is also possible to use a *Container Deployment* of pgAdmin, in which Server
Mode is pre-configured for security.
.. toctree::
:maxdepth: 2
desktop_deployment
deployment
login
user_management
change_user_password
enabling_ldap_authentication
.. note:: Pre-compiled and configured installation packages are available for
a number of platforms. These packages should be used by end-users whereever
@@ -68,17 +65,19 @@ display. To open the *Preferences* dialog, select *Preferences* from the *File*
for the dialog. You can access additional Postgres help by navigating through
the *Help* menu, and selecting the name of the resource that you wish to open.
Contents:
You can search for objects in the database using the :ref:`Search objects <search_objects>`
.. toctree::
:maxdepth: 2
browser
pgadmin_menu_bar
pgadmin_toolbar
pgadmin_tabbed_browser
pgadmin_tree_control
user_interface
menu_bar
toolbar
tabbed_browser
tree_control
preferences
keyboard_shortcuts
search_objects
Before using pgAdmin to manage objects that reside on a server, you must define a
connection to the server; for more information please see *Connecting to a Server*
+55 -18
View File
@@ -4,51 +4,88 @@
`Grant Wizard`:index:
*********************
The *Grant Wizard* tool is a graphical interface that allows you to manage the privileges of one or more database objects in a point-and-click environment. A search box, dropdown lists, and checkboxes facilitate quick selections of database objects, roles and privileges.
The *Grant Wizard* tool is a graphical interface that allows you to manage the
privileges of one or more database objects in a point-and-click environment. A
search box, dropdown lists, and checkboxes facilitate quick selections of
database objects, roles and privileges.
The wizard organizes privilege management through a sequence of windows: *Object Selection (step 1 of 3)*, *Privileges Selection (step 2 of 3)* and *Final (Review Selection) (step 3 of 3)*. The *Final (Review Selection)* window displays the SQL code generated by wizard selections.
The wizard organizes privilege management through a sequence of windows:
*Object Selection (step 1 of 3)*, *Privileges Selection (step 2 of 3)* and
*Final (Review Selection) (step 3 of 3)*. The *Final (Review Selection)* window
displays the SQL code generated by wizard selections.
To launch the *Grant Wizard* tool, select a database object in the *pgAdmin* tree control, then navigate through *Tools* on the menu bar to click on the *Grant Wizard* option.
To launch the *Grant Wizard* tool, select a database object in the *pgAdmin*
tree control, then navigate through *Tools* on the menu bar to click on the
*Grant Wizard* option.
.. image:: images/grant_wizard_step1.png
:alt: Grant wizard step one page
:align: center
Use the fields in the *Object Selection (step 1 of 3)* window to select the object or objects on which you are modifying privileges. Use the *Search by object type or name* field to locate a database object, or use the scrollbar to scroll through the list of all accessible objects.
Use the fields in the *Object Selection (step 1 of 3)* window to select the
object or objects on which you are modifying privileges. Use the *Search by
object type or name* field to locate a database object, or use the scrollbar
to scroll through the list of all accessible objects.
* Each row in the table lists object identifiers; check the checkbox in the left column to include an object as a target of the Grant Wizard. The table displays:
* Each row in the table lists object identifiers; check the checkbox in the left
column to include an object as a target of the Grant Wizard. The table
displays:
* The object type in the *Object Type* field
* The schema in which the object resides in the *Schema* field
* The object name in the *Name* field.
Click the *Next* button to continue, or the *Cancel* button to close the wizard without modifying privileges.
Click the *Next* button to continue, or the *Cancel* button to close the wizard
without modifying privileges.
.. image:: images/grant_wizard_step2.png
:alt: Grant wizard step two page
:align: center
Use the fields in the *Privileges Selection (step 2 of 3)* window to grant privileges. If you grant a privilege WITH GRANT OPTION, the Grantee will have the right to grant privileges on the object to others. If WITH GRANT OPTION is subsequently revoked, any role who received access to that object from that Grantee (directly or through a chain of grants) will lose thier privileges on the object.
Use the fields in the *Privileges Selection (step 2 of 3)* window to grant
privileges. If you grant a privilege WITH GRANT OPTION, the Grantee will have
the right to grant privileges on the object to others. If WITH GRANT OPTION is
subsequently revoked, any role who received access to that object from that
Grantee (directly or through a chain of grants) will lose thier privileges on
the object.
* Click the *Add* icon (+) to 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. If privileges have previously been granted on a database object, unchecking a privilege for a group or user will result in revoking that privilege.
* If enabled, 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 the *Add* icon (+) to assign a set of privileges to another role; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* dialog.
* 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. If
privileges have previously been granted on a database object, unchecking a
privilege for a group or user will result in revoking that privilege.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
* Click the *Add* icon (+) to assign a set of privileges to another role; to
discard a privilege, click the trash icon to the left of the row and confirm
deletion in the *Delete Row* dialog.
For more information about granting privileges on database objects, see the `PostgreSQL core documentation <http://www.postgresql.org/docs/9.5/static/sql-grant.html>`_.
For more information about granting privileges on database objects, see the
`PostgreSQL core documentation <https://www.postgresql.org/docs/current/sql-grant.html>`_.
Click the *Next* button to continue, the *Back* button to select or deselect additional database objects, or the *Cancel* button to close the wizard without modifying privileges.
Click the *Next* button to continue, the *Back* button to select or deselect
additional database objects, or the *Cancel* button to close the wizard without
modifying privileges.
Your entries in the *Grant Wizard* tool generate a SQL command; you can review the command in the *Final (Review Selection) (step 3 of 3)* window (see an example below).
Your entries in the *Grant Wizard* tool generate a SQL command; you can review
the command in the *Final (Review Selection) (step 3 of 3)* window (see an
example below).
**Example**
Example
*******
The following is an example of the sql command generated by user selections in the *Grant Wizard* tool:
The following is an example of the sql command generated by user selections in
the *Grant Wizard* tool:
.. image:: images/grant_wizard_step3.png
:alt: Grant wizard step three page
:align: center
The commands displayed assign a role named *Bob* *INSERT* and *UPDATE* privileges *WITH GRANT OPTION* on the *sales_meetings* and the *sales_territories* tables.
The commands displayed assign a role named *Bob* *INSERT* and *UPDATE*
privileges *WITH GRANT OPTION* on the *sales_meetings* and the
*sales_territories* tables.
* Click the *Back* button to select or deselect additional database objects, roles and privileges.
* Click the *Back* button to select or deselect additional database objects,
roles and privileges.
* Click the *Cancel* button to exit without saving work.
* Click the *Finish* button to save selections and exit the wizard.
* Click the *Finish* button to save selections and exit the wizard.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 37 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 42 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 144 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Executable → Regular
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 73 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 57 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 70 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 57 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Executable → Regular
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Loaded 100 of 3923 files, more files were not shown because too many files have changed in this diff. Show more