Compare commits

..
685 Commits
Author SHA1 Message Date
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
Akshay Joshi 28555b387f Update version for release 2019-03-04 17:35:55 +05:30
Akshay Joshi 9ad8756ec2 Update message catalogs. 2019-03-04 17:30:42 +05:30
Khushboo Vashi 98815af8b6 Fix the position of text editor of a cell in Query Tool. 2019-03-04 16:39:30 +05:30
Akshay Joshi 0aeb20ee64 Prevent auto-commit/rollback being changed mid-transaction, and make the Preferences the defaults, not the current values. 2019-03-04 10:44:31 +00:00
Khushboo Vashi efeb9d6d20 Fix regression issue caused due to encoding fixes. 2019-03-04 16:11:20 +05:30
Abhilasha Narendra 9d96d6123e Update documentation screenshots as per new design. Fixes #3890 2019-03-04 13:06:04 +05:30
Murtuza Zabuawala 36ffdb93e8 Custom-encode forward slashes in URL parameters as Apache HTTPD doesn't allow them in some cases. Fixes #3998 2019-03-01 14:55:25 +00:00
Dave Page ecbba79c2a Fix PEP-8 issue. 2019-03-01 14:19:08 +00:00
Dave Page 13f52ad9ac Update release notes. 2019-03-01 13:54:11 +00:00
Khushboo Vashi 849e34c2f7 Add full support and testsfor all PG server side encodings. Fixes #3992. Fixes #3982. Fixes #3911 2019-03-01 13:51:50 +00:00
Murtuza Zabuawala fb747b8031 Fix download CSV for IE11 which doesn't support the download attribute. Fixes #4040 2019-03-01 13:32:40 +00:00
Khushboo Vashi c6d295727c Fix resizing of the results grid, when full of data. 2019-03-01 12:49:41 +00:00
Aditya Toshniwal 74cfeabd02 Fix graphical explain now that JSON data is sent as text to stop JS futzing with it. Fixes #4041 2019-03-01 12:38:57 +00:00
Dave Page d8f9e3e87b Optimise the Docker file to minimise the number of layers and maximise the chances that changes will be in the last layers built. 2019-03-01 12:29:05 +00:00
Dave Page f552519ed6 Set the Gunicorn worker timeout to match the configured session expiry. Partially fixes #3656 2019-03-01 11:55:17 +00:00
Akshay Joshi bbeb395beb Ignore exceptions in the logger. Fixes #3933 2019-02-28 13:22:12 +00:00
Dave Page acb61f0990 Use POST instead of GET for Query Tool downloads to avoid errors with long queries. Fixes #4013 2019-02-27 17:08:53 +00:00
Aditya Toshniwal e6e7cf0f69 Fix support for bigint's in JSONB data. Fixes #3587 2019-02-27 13:39:47 +00:00
Khushboo Vashi 6b3a628e7a Fix double scrollbar on the query tool results grid. 2019-02-27 10:59:58 +00:00
Aditya Toshniwal 9c5b9364b6 Support double-click on Query Tool result grid column resize handles to auto-size to the content. Fixes #4034 2019-02-26 13:44:16 +00:00
Dave Page 1770c94b07 Fix the text highlight colour. 2019-02-25 17:08:05 +00:00
Dave Page 0694f59e70 Fix formatting 2019-02-25 12:51:50 +00:00
Aditya Toshniwal 98bfbcff8f Fix dashboard test cases. 2019-02-25 12:27:15 +00:00
Dave Page 42aa4dcd22 Clarify pgAgent installation options. 2019-02-25 12:10:53 +00:00
Aditya Toshniwal 59446bb4b5 Ensure JSON data isn't modified in-flight by psycopg2 when using View/Edit data. Fixes #3600 2019-02-25 10:34:36 +00:00
Akshay Joshi a5d39003b6 Handle display of roles with expiration set to infinity correctly. Fixes #3352 2019-02-25 10:24:11 +00:00
Dave Page c45675e019 Ensure long queries don't cause errors when downloading CSV in the Query Tool. Fixes #4013
This was actually fixed by #3673 it would appear.
2019-02-22 16:29:45 +00:00
Dave Page 27d3990ba2 Allow editing of values in columns with the oid datatype which are not an actual row OID. Fixes #3418 2019-02-22 16:18:39 +00:00
Dave Page d326ddd21a Update release notes as the fix for #3583 appears to have resolved other issues. Fixes #4000 2019-02-22 15:44:14 +00:00
Dave Page 3ad606733a Update doc colours to more closely match the new UI. 2019-02-22 15:22:50 +00:00
Akshay Joshi 38b034ec3c Add Commit and Rollback buttons to the Query Tool. Fixes #2418 2019-02-22 14:28:05 +00:00
Dave Page 0766b17726 Enable/disable the Download button with the Execute button. 2019-02-22 09:34:48 +00:00
Dave Page 73b144c45c Fix an issue where importing servers fails if a group already exists for a different user. Fixes #4022 2019-02-21 15:40:37 +00:00
Khushboo Vashi 98283c1213 Disable the editor and execute functions whilst queries are executing. Fixes #4021 2019-02-21 14:19:25 +00:00
Akshay Joshi 5be0d17df5 Don't exclude SELECT statements from transaction management in the Query Tool in case they call data-modifying functions. Fixes #3958 2019-02-21 14:05:10 +00:00
Dave Page bacb57086c Update CodeMirror to 5.43.0 to resolve issues with auto-indent. Fixes #3583 2019-02-21 10:57:44 +00:00
Dave Page e5598038fa Ensure size stats are prettified on the statistics tab when the UI language != English. Fixes #3096 2019-02-20 16:39:38 +00:00
Dave Page a39f43788b Include multiple versions of the PG utilties in containers. Fixes #3886 2019-02-20 15:17:16 +00:00
Dave Page aae49b5324 Update Docker README to match reality. 2019-02-20 14:51:36 +00:00
Khushboo Vashi 34045efb38 Modify the Download as CSV option to use the same connection as the Query Tool its running in so temporary tables etc. can be used. Fixes #3673 2019-02-20 11:49:45 +00:00
Aditya Toshniwal 292ac32db5 Fix editing of table data with a JSON primary key. Fixes #3912 2019-02-20 11:15:39 +00:00
Neel Patel ccb0796317 Convert the JSON output from yarn properly 2019-02-19 13:18:37 +00:00
Dave Page 841af6868d Fix paste issue during commit :-s 2019-02-18 17:08:18 +00:00
Murtuza Zabuawala e2482d2294 Set the background colour for backform notes, and add an icon. Fixes #3948 2019-02-18 16:59:39 +00:00
Khushboo Vashi 554455fa75 Fix treeview state saving after reset. 2019-02-18 13:15:22 +00:00
Dave Page 255afe673a Add a "scratch pad" to the Query Tool to hold text snippets whilst editing. Fixes #2233 2019-02-15 15:44:49 +00:00
Dave Page c64373435b Make the Query Tool tab titles more concise and useful. Fixes #3544 2019-02-15 15:09:49 +00:00
Khushboo Vashi 622b67684d Optimise display of Dependencies and Dependents, and use on-demand loading of rows in batches of 100. Fixes #3959 2019-02-14 11:15:01 +00:00
Dave Page e5e154e268 PEP-8 fix 2019-02-14 09:22:22 +00:00
Dave Page 122336eb63 Update release notes. 2019-02-14 09:19:36 +00:00
Khushboo Vashi 17694ab467 Automatically expand child nodes as well as the selected node on the treeview if there is only one. Fixes #3559
This also ensure the browser state is cleared if the save interval is set to -1.
2019-02-14 09:18:08 +00:00
Dave Page 438116c574 Update Alpine Linux version in the docker container. This also updates the PG utilities to v11. Fixes #3991 2019-02-13 17:18:14 +00:00
Akshay Joshi 944cc55df7 Prevent an error when closing the Sort/Filter dialogue with an empty filter string. Fixes #3970 2019-02-13 16:44:57 +00:00
Dave Page 6af8efb5b1 You can't change colours in Preferences. Fixes #2990 2019-02-13 11:07:47 +00:00
Akshay Joshi 1f43b05c2a Fix alignment of checkbox to drop multiple schedules of pgAgent job. Fixes #3946 2019-02-13 14:55:52 +05:30
Akshay Joshi 10ee75bb1f Fix alignment of Close and Maximize button of Grant Wizard. Fixes #3906 2019-02-13 13:13:07 +05:30
Akshay Joshi 0aa93ac3ba Fix alignment of Connection type toggle switch of pgagent. Fixes #3974 2019-02-13 13:03:44 +05:30
Dave Page f72dcc23ea Allow X-FRAME-OPTIONS to be set in config.py. Default to SAMEORIGIN. Fixes #3439
DENY cannot be supported without breaking the debugger and query tool.
2019-02-12 16:17:14 +00:00
Dave Page 1fc66406f5 Don't embed docs and external sites in iframes, to allow the external sites to set X-FRAME-OPTIONS = DENY for security. Fxies #3985 2019-02-12 16:07:38 +00:00
Dave Page e0e7d6f1f6 Install a script to start pgAdmin (pgadmin4) from the command line when installed from the Python wheel. Fixes #1825 2019-02-12 14:04:45 +00:00
Dave Page 7f3e5c95c6 Add a missing bug fix. 2019-02-11 15:45:13 +00:00
Akshay Joshi 399d490342 Fix context sub-menu alignment on Safari. Fixes #3873 2019-02-11 13:38:11 +00:00
Ashesh Vashi c411520d98 Increase table header vertical padding to make headers more distinguished. 2019-02-11 10:58:19 +00:00
Dave Page 3d202dceeb Fix header. 2019-02-08 15:14:07 +00:00
Dave Page 23f36c5a41 Fix header. 2019-02-08 15:13:38 +00:00
Dave Page 6db4cfd9f1 Update libraries.txt, generated automatically using tools/dependency_inventory.py 2019-02-08 15:11:45 +00:00
Dave Page 9c3da10eea Python 2.7 fixes. 2019-02-08 15:06:38 +00:00
Dave Page a4cd2fe6c6 Add a script for auto-generating the library.txt file. 2019-02-08 14:48:59 +00:00
Ashesh Vashi eb3d3980e0 Use 'set_config(...)' function to update the 'bytea_output' settings
instead of 'UPDATE' statement, which is not allowed in the the read-only
instances.

Reported by: Robert J. Rotter
Solution provided by: Tom Lane

Fixes #3973
2019-02-08 10:18:32 +05:30
Cyril Jouve 28ce485cd2 requirements.txt simplifications. 2019-02-07 10:34:07 +00:00
Cyril Jouve a1ce6d9513 Remove another Python 2.6 hack 2019-02-07 10:32:40 +00:00
Ashesh Vashi 8efdc43177 Removing the font smoothing for the firefox as per feedback from Chethana 2019-02-07 15:30:55 +05:30
Ashesh Vashi 8c65608946 Adding font-smoothing CSS for the OSX for making the fonts more
eye-pleasing and softer to match it with the proposed design.
2019-02-07 15:21:55 +05:30
Akshay Joshi 22d458b01e Close connections gracefully when the user logs out of pgAdmin. Fixes #3942 2019-02-06 13:17:52 +00:00
Akshay Joshi 0cc37de404 Added release_notes_4_3 to the toctree for the documentation. 2019-02-06 17:03:56 +05:30
Akshay Joshi 8f4d1f14f2 1) Fix alignment of import/export toggle switch. Fixes #3963
2) Remove unnecessary options for toggle switch which are already the default options.
2019-02-06 16:49:36 +05:30
Dave Page c888b282ea Update libraries.txt 2019-02-06 10:11:16 +00:00
Khushboo Vashi 4a75053514 Clean up the unwanted extended versions of Backform Switch controls.
The Bootstrap Switch Control was extended only for alignment in most
places. IIntroduce a configurable option to set the necessary class
on the main div and also remove the extra extended controls.
2019-02-05 16:22:35 +00:00
Fred Escallier 3fae181c27 Update French translation. 2019-02-05 16:13:15 +00:00
Identifier Anonymous c6ba8899d1 Update Japanese translation. 2019-02-05 16:10:48 +00:00
Akshay Joshi 9a758f8fd3 Update version for release. 2019-02-04 18:04:33 +05:30
Akshay Joshi bb25d1a986 Update message catalogs 2019-02-04 17:59:28 +05:30
Aditya Toshniwal d2ee5c4e82 1) Fixed jasmine test cases.
2) Bootstarp4 toggle size should be mini for triggers
2019-02-04 17:43:19 +05:30
Aditya Toshniwal 605b1f4799 Fixed API test case for dashboard graphs. 2019-02-04 16:36:16 +05:30
Navnath Gadakh 5fdc1ffb38 Exclude HTTPExceptions from the all_exception_handler as they should be returned as-is. Fixes #3961 2019-02-04 10:31:47 +00:00
Dave Page 9c21c07fc4 Correct error message. 2019-02-04 10:23:43 +00:00
Akshay Joshi da83c3d1b8 Added 'pga4dash' comment for consistency 2019-02-04 15:51:07 +05:30
Dave Page 9df89f9bd5 There are no new features in 4.1 or 4.2, just fixes and optimisations. 2019-02-04 10:10:53 +00:00
Aditya Toshniwal aad7830d37 Dashboard graph optimization. Fixes #3941 2019-02-04 15:39:47 +05:30
Khushboo Vashi dae8186c2a Replace Bootstrap switch with Bootstrap4 toggle to improve the performance. Fixes #3051 2019-02-04 11:31:48 +05:30
Akshay Joshi 93234c86b7 Fix alignment of submenu for Internet Explorer. Fixes #3932 2019-02-01 17:55:38 +05:30
Cyril Jouve b786c4c140 Replace the PyCrypto module with the cryptography module. Fixes #3272 2019-01-31 15:57:27 +01:00
Dave Page cbfa614cf9 Ensure we use PIP 18.1 in the Docker build because of https://github.com/pypa/pip/issues/6197 2019-01-31 14:28:20 +01:00
Diego Augusto Molina da3b3de397 Expose the bind address in the Docker container via PGADMIN_BIND_ADDRESS. Fixes #3955 2019-01-31 14:26:35 +01:00
Cyril Jouve cbd8f8236a Remove Python 2.6 code that's now obsolete. Fixes #3935 2019-01-31 13:47:56 +01:00
Ashesh Vashi 38feacd04d Remove hacky way to open/close the dropdown submenu 2019-01-31 17:49:41 +05:30
Khushboo Vashi 6244463ac1 Fixed Statistics panel hang issue for 1000+ tables. Fixes #3664 2019-01-31 14:47:29 +05:30
Akshay Joshi 2afa3d8267 Remove icon for 'Refresh View' context menu of Materialized View and Added label for Definition control for consistency. 2019-01-31 13:20:44 +05:30
Khushboo Vashi 3b35aaa1d7 Fixed unable to drop multiple Rules and Foreign Tables from properties tab. Fixes #3899 2019-01-31 13:03:37 +05:30
Akshay Joshi 1bce0b5eef Update yarn lockfile. 2019-01-31 12:24:07 +05:30
Akshay Joshi 0bb4f005e5 Correct schema should be displayed in Materialized View dialog. Fixes #3916 2019-01-31 11:29:18 +05:30
Murtuza Zabuawala 317a04eafc Handle backend errors properly and display them correctly on GUI for Grant Wizard 2019-01-30 16:39:34 +05:30
Akshay Joshi 0e489df7b0 Fixed debugger issue for procedure inside package for EPAS servers. Fixes #3927 2019-01-30 14:48:58 +05:30
Aditya Toshniwal ab094e8f16 Increase frames splitter mouse hover area to make it easier to resize. Fixes #3865 2019-01-30 14:26:36 +05:30
Ashesh Vashi 430be1c4cb Increase the width, and show the pointer cursor of the button under the
sortable backgrid header
2019-01-30 11:55:35 +05:30
Ashesh Vashi 0e8f804279 Show the help string separate block in the calendar control to align the
input, and calendar button properly in case of help string is present.
2019-01-30 11:42:38 +05:30
Ashesh Vashi 1858596253 Override the font-family defined by bootstrap 2019-01-30 10:21:36 +05:30
Akshay Joshi fedbcd4045 Ensure that output of the query should be displayed even if Data Output window is detached from the Query Tool. Fixes #3697 2019-01-29 18:48:21 +05:30
Aditya Toshniwal 821496dc84 Fixed Query Tool Initialization Error. Fixes #3903 2019-01-29 11:45:31 +05:30
Murtuza Zabuawala 07f16f40cd Ensure that grant wizard should list down functions for EPAS server running with no-redwood-compat mode. Fixes #3935 2019-01-28 12:47:27 +05:30
Murtuza Zabuawala 2d7eaa63c4 Fix alignment of help messages in properties panels. Fixes #3929 2019-01-24 16:39:55 +00:00
Murtuza Zabuawala d9fc9fdc4d Ensure object names in external process dialogues are properly escaped. Fixes #3872 2019-01-24 16:34:18 +00:00
Harshal Dhumal 42c7ae372f Fixed dialog tab navigation for Backup and Restore dialog. Fixes regression of #3862 2019-01-24 17:15:12 +05:30
Khushboo Vashi d4fe31404c Fix syntax error on python 2.7 for the feature test. 2019-01-24 11:25:00 +05:30
Akshay Joshi f316e0533e 1) Messages tab of query tool should be clear on subsequent execution of table/view using View/Edit Data. Fixes #3608
2) Clear drop-down menu should be disabled for View/Edit Data. Fixes #3609
2019-01-23 18:25:33 +05:30
Dave Page 08cf2c8310 Ensure we set the fixed port options properly when configuring following an error. 2019-01-23 12:12:16 +00:00
Khushboo Vashi 406ada10f5 Fixed EXEC script for procedures. Fixes #3850 2019-01-23 14:44:24 +05:30
Aditya Toshniwal 1f29859040 Improve application level exception handling for unhandled exceptions. 2019-01-23 12:49:05 +05:30
Aditya Toshniwal fcfe0929d3 Ensure that browser should warn before close or refresh. Fixes #3849 2019-01-23 11:57:36 +05:30
Murtuza Zabuawala e27c2c421e Update chromedriver. 2019-01-22 16:11:01 +00:00
Diego Augusto Molina d92368f8e5 Use 'UPDATE pg_settings' for setting bytea_output as a
convenience hack for those running on old, unsupported versions of
PostgreSQL 'cos we're nice like that.
2019-01-22 15:56:29 +00:00
Akshay Joshi 11ab1918ea Fixed domain sql regression test for EPAS 2019-01-22 18:22:16 +05:30
Khushboo Vashi c6bae69b6f Proper SQL should be generated when create domain of type interval with precision. Fixes #3853 2019-01-22 17:53:36 +05:30
Harshal Dhumal ea87d6da8f Fixed keyboard navigation for Select2 and Privilege cell in Backgrid Fixes #3908 2019-01-22 16:35:57 +05:30
Harshal Dhumal f731ab730b Fixed keyboard navigation for dialog tabs. Fixes #3862 2019-01-22 16:28:32 +05:30
Akshay Joshi 3e7381414f Drop-down should be closed when click on any other toolbar button. Fixes #3858 2019-01-22 16:05:02 +05:30
Murtuza Zabuawala cd311ca8a9 Remove session from the grid on the dashboard when it is terminated. 2019-01-22 14:25:11 +05:30
Ganesh Jaybhay a0d2c45361 1. Proper alignment of help message with date time control.
2. Added help-block class for helpMessageClassName.
2019-01-22 11:22:32 +05:30
Nozomi Anzai 407f885559 Updated Japanese translation. 2019-01-21 16:54:41 +00:00
Aditya Toshniwal 6fc2e032f3 Fixed alignment of tree arrow icons for Internet Explorer. Fixes #3871 2019-01-21 17:40:05 +05:30
Khushboo Vashi 3ffeb4be45 Ensure that database restriction of server dialog should work with special characters. Fixes #3800 2019-01-21 17:24:46 +05:30
Aditya Toshniwal a9794d8ab4 Ensure that file format combo box value should not retained when hidden files checkbox is toggled. Fixes #3840 2019-01-21 16:22:59 +05:30
Khushboo Vashi aedb3997b0 Ensure that Backup/Restore button should work on single click. Fixes #3811 2019-01-21 15:27:55 +05:30
Akshay Joshi c7cbe0ff4a Data should be updated properly for FTS Configurations, FTS Dictionaries, FTS Parsers and FTS Templates. Fixes #3897 2019-01-21 14:36:39 +05:30
Aditya Toshniwal 27cdb835cb Correct order of Save and Cancel button for json/jsonb editing. Fixes #3891 2019-01-18 18:14:50 +05:30
Aditya Toshniwal 06ae799d02 Handle text wrapping in alertify dialog only when it is required. Regression of #3695 2019-01-18 17:54:49 +05:30
Akshay Joshi 69f6895224 Proper SQL should be generated when create function with return type as custom type argument. Fixes #3774 2019-01-18 15:11:35 +05:30
Akshay Joshi a163edec7a Inline edbspl trigger functions should not be visible in Grant Wizard. Fixes #3740 2019-01-17 18:37:36 +05:30
Aditya Toshniwal 48660508ce Fixed controls alignment responsiveness to docker size change. 2019-01-17 18:20:12 +05:30
Aditya Toshniwal f779378e8a Add right border on selected tree item. 2019-01-17 13:27:07 +05:30
Akshay Joshi c1aba3e055 1) Proper SQL should be generated when creating/changing column with custom type argument. Fixes #3838
2) Proper SQL should be generated when create procedure with custom type arguments. Fixes #3846
2019-01-17 13:13:15 +05:30
Aditya Toshniwal 6bbcaf6b27 Fixed SQL for when clause while creating Trigger. Fixes #3837 2019-01-16 14:46:34 +05:30
Aditya Toshniwal dec43d98dc Fixed execution time to show Hours part for long running queries in Query Tool. Fixes #3475 2019-01-16 12:57:52 +05:30
Aditya Toshniwal d7b0508305 Fixed SQL for foreign table options. Fixes #3453 2019-01-16 12:34:16 +05:30
Aditya Toshniwal 7ac4e2a9d9 Fixed following issues:
- Process watcher made fixed width with header changes, time details rounded to 2 decimals
 - Query history will show "No query history" if no query fired. Query editor default size increased.
 - Fixed a bug where New folder create button not working when in List mode and No files/folder present.
 - Other minor improvements.
2019-01-16 11:55:08 +05:30
Aditya Toshniwal 2a359d9d77 Proper error should be thrown when server group is created with existing name. Fixes #3693 2019-01-15 18:38:01 +05:30
Aditya Toshniwal 7b0c81126c Ensure long string should be wrap in alertify dialogs. Fixes #3695 2019-01-15 18:23:59 +05:30
Ashesh Vashi 6735c30292 Define some of the variables in _default.variables.scss with '!default'
suffix to allow override them while defining another theme.
2019-01-15 13:01:16 +05:30
Ashesh Vashi 1f082a0488 Fixed a typo in the wizard.js, which was not allowing to show the
maximize button in the Grant Wizard.

Also - change the CSS to set the top to '0' of the ajs-content (alertify
content container) for the frameless dialogs.
2019-01-15 12:59:13 +05:30
Akshay Joshi 8b135f2932 Update message catalog and version for release. 2019-01-11 23:34:24 +05:30
Aditya Toshniwal d4a2f1b8cd Ensure that last row of table data should be visible and user will be able to add new row. Fixes #3866 2019-01-11 23:25:05 +05:30
Dave Page 14f462e9dc Fix PEP-8 issues. 2019-01-11 22:13:17 +05:30
Aditya Toshniwal d641b47adb Make the browser more robust in the face of multibyte characters in SQL_ASCII databases. Fixes #3877 2019-01-11 21:55:49 +05:30
Akshay Joshi 252e05ef29 Fix SQL generated for tables with inherited columns. Fixes #3505 2019-01-11 21:50:02 +05:30
Akshay Joshi 8fb340d23b Fix ordering of VACUUM options which changed in PG11. Fixes #3836
While we're at it, fix the JSON handling in the maintenance/backup/restore routes.
2019-01-10 15:29:55 +05:30
Aditya Toshniwal a8167f0a72 Fix Jasmine tests. 2019-01-10 15:02:51 +05:30
Aditya Toshniwal f7fa18f827 Ensure the context menu works after a server is renamed. Fixes #3575 2019-01-10 11:52:52 +05:30
Akshay Joshi 01b87d4834 Don't show system catalogs in the schemas property list unless show system objects is enabled. Fixes #3842 2019-01-10 11:41:09 +05:30
Aditya Toshniwal 868622912e Fix help for the backup/restore dialogues. Fixes #3861 2019-01-10 11:20:42 +05:30
Fred Escallier 6d0c4bc116 Updated French translation 2019-01-08 17:18:38 +05:30
Aditya Toshniwal 3c7742f3b2 Fixed an issue while creating export job. Fixes #3856 2019-01-08 13:02:29 +05:30
Dave Page 11870006c3 Correct dashboard title. 2019-01-07 18:02:22 +05:30
Akshay Joshi ea514115c3 Update the release note version in toctree 2019-01-07 16:34:25 +05:30
Akshay Joshi 561ee7556f Update version for release 2019-01-07 16:14:58 +05:30
Akshay Joshi e2857332b7 Update message catalogs 2019-01-07 16:09:25 +05:30
Aditya Toshniwal d361e604c1 Further style tweaks. 2019-01-07 16:03:54 +05:30
Dave Page 419bb7f995 Include rtf files in the copyright updater. 2019-01-07 14:38:12 +05:30
Dave Page 365cbc34f5 Fix MacOS package copyright. 2019-01-07 14:37:43 +05:30
Aditya Toshniwal e9ba2e036a Further style tweaks. 2019-01-07 14:24:44 +05:30
Dave Page c5d49bd862 Fix copyright year. 2019-01-07 11:28:39 +05:30
Identifier Anonymous 23b649fbd1 Update Japanese translation. 2019-01-04 16:17:43 +00:00
Khushboo Vashi ce1c06d7f1 Ensure we display the relation name (and not the OID) in the locks table wherever possible. Fixes #3702
Note that at the server level we fetch the data from pg_locks in the maintenance database,
so it can not fetch the pg_class relation for tables in other databasess (relation::regclass).
2019-01-04 14:45:28 +00:00
Dave Page fb02f8b1be Update release notes. 2019-01-04 13:11:20 +00:00
Akshay Joshi 4e27bf989f Display event trigger functions correctly on EPAS. Fixes #3549 2019-01-04 13:06:45 +00:00
Dave Page b5c7a108ab Put the appname back how it should be! 2019-01-04 10:54:35 +00:00
Dave Page d6778aa915 Bump version prior to 4.0 2019-01-04 10:53:10 +00:00
Dave Page 7d2ab6a685 Fix copyright notice. 2019-01-04 10:52:54 +00:00
Dave Page 7f40444087 Update WSGI instructions for Windows for Python 3. Fixes #3847. Patch from Benjamin Hayes. 2019-01-04 09:54:24 +00:00
Dave Page ad56e7fb12 Update message catalogs 2019-01-03 15:27:36 +00:00
Dave Page 598f69b63d Improve wording. 2019-01-03 15:24:47 +00:00
Aditya Toshniwal 7d765fea04 Further styling fixes. 2019-01-03 14:50:24 +00:00
Aditya Toshniwal 1283c22bb9 Fix a webpack issue that could cause the Query Tool to fail to render. Fixes #3679 2019-01-03 14:43:45 +00:00
Dave Page 2817ec438a Convert batch file line endings in an attempt to end the insanity of missing labels. 2019-01-03 14:33:43 +00:00
Akshay Joshi c455dda3ce Ensure auto complete should works for columns from a schema-qualified table. Fixes #3810 2019-01-03 18:59:57 +05:30
Akshay Joshi 3a130d68c5 Ensure auto complete should works when first identifier in the FROM clause needs quoting. Fixes #3809 2019-01-03 17:22:42 +05:30
Dave Page 6a9406237a Update yarn lockfile. 2019-01-02 12:57:21 +00:00
Dave Page d7da8be486 Make the upgrade check key configurable. 2019-01-02 12:56:39 +00:00
Aditya Toshniwal 6e5b54eb1a Increase default startup timeout and give progressive messages when things are slow. 2019-01-02 11:57:33 +00:00
Murtuza Zabuawala e23d307c56 Update copyright notices for 2019 2019-01-02 15:54:12 +05:30
Aditya Toshniwal 86ecf9c84e Fixed following:
- Base font size changed from 0.815rem to 0.875rem, for navbar from 0.875rem to 0.925rem.
- Dialog sizes made consistent throughout the application. Now there are 3 size options for width and height each - sm, md, lg. Combination of any of these to be used hereafter
- Alignment fix for controls of Node properties dialogs which includes showing text and label in one line without dialog size change, checkbox alignment, switch control alignment at places and other minor improvements in other dialogs
- Error message design change in dialogs validation
- SQL Editor data grid editor popup design changes which were missed
- Design change for dashboard server activity grid
- Login page language dropdown color fix
- Properties accordion collapse design fix
- Help, Info icon fixed across all dialogs which were not working if clicked exactly on the text
- Added missing icon with buttons at few places
- Shadow behind the dialogs is increased to make it look clearly separated and depth.
- Control Alignment fix in maintenance dialog
- Min height of alertify dialogs set for better UX
- File dialog design fix when no files found
- Grant wizard fixes - Scroll bar visibility on first page, use full space for SQL generated on the last page
- Browser toolbar buttons changed to sync with SQL editor toolbar buttons
- Rounded corners for docker floating dialog (no properties)
- Renaming file in file dialog should show original file name
- SQL data grid text edit popup buttons behaviour was swapped. This is fixed.
- Import/Export dialog changes as per new design.
2019-01-02 15:07:59 +05:30
Ashesh Vashi 1b9c841c15 pgBrowser tree does not need to save tree state, when 'browser' module
is initialized from the tools like query editor, debugger, etc.

Refs #3559
2019-01-02 10:48:13 +05:30
Akshay Joshi 41c028f944 Ensure that null values handled properly in CSV download. Fixes #3780 2019-01-01 15:15:36 +05:30
Ashesh Vashi 5799ac14ba Improvement in the look and feel of the whole application
Changed the SCSS/CSS for the below third party libraries to adopt the
new look 'n' feel:
- wcDocker
- Alertify dialogs, and notifications
- AciTree
- Bootstrap Navbar
- Bootstrap Tabs
- Bootstrap Drop-Down menu
- Backgrid
- Select2

Adopated the new the look 'n' feel for the dialogs, wizard, properties,
tab panels, tabs, fieldset, subnode control, spinner control, HTML
table, and other form controls.

- Font is changed to Roboto
- Using SCSS variables to define the look 'n' feel
- Designer background images for the Login, and Forget password pages in
  'web' mode
- Improved the look 'n' feel for the key selection in the preferences
  dialog
- Table classes consistency changes across the application
- File Open and Save dialog list view changes

Author(s): Aditya Toshniwal & Khushboo Vashi
2018-12-21 17:14:55 +05:30
Khushboo Vashi a000dc6f60 Further improvements to treeview restoration. Fixes #3559 2018-12-21 11:36:11 +00:00
Dave Page 12b7e03085 Add flask-migrate to the container doc build as it's now required. 2018-12-21 10:58:15 +00:00
Aditya Toshniwal 943fc25f60 Make the setup process more robust against aborted executions. Fixes #3830 2018-12-21 10:30:49 +00:00
Dave Page f62d35bf3c Don't lose the comma! 2018-12-20 11:03:54 +00:00
Dave Page e2df00fc05 Use the standard copyright string. 2018-12-20 10:58:31 +00:00
Murtuza Zabuawala 36db047071 Add a copyright update tool. 2018-12-20 10:54:54 +00:00
Aditya Toshniwal ffae65bdbe Ensure table definitions include WHERE clauses on EXCLUDE constraints. Fixes #3726 2018-12-20 10:19:54 +00:00
Khushboo Vashi d14fb85fff Tweak the wording on the Grant Wizard. Fixes #3796 2018-12-20 10:17:00 +00:00
Murtuza Zabuawala 13dbfff11d Ensure identifiers are properly displayed in the plan viewer. Fixes #3821 2018-12-20 10:09:11 +00:00
Murtuza Zabuawala ed01dbd0ef Ensure the dashboard tabs are styles correctly. Fixes #3824 2018-12-20 09:53:35 +00:00
Dave Page cb880678cc Python 2.6 support is officially deprecated. 2018-12-20 09:15:26 +00:00
Akshay Joshi 7515e08578 Fix an issue when user define Cast from smallint->text is created. Fixes #3753 2018-12-19 18:02:04 +05:30
Akshay Joshi c973c3387e Include the WHERE clause on EXCLUDE constraints in RE-SQL. Fixes #3726 2018-12-18 13:37:04 +00:00
Khushboo Vashi 72ba5bdaee Fix drop/drop cascade regression. Fixes #3823 2018-12-18 09:45:06 +00:00
Dave Page 62bb3ca097 Correct bug number, per Khushboo. 2018-12-13 11:51:57 +00:00
Khushboo Vashi e666b0fab0 Fix an issue that could cause the Query Tool to fail to render. Fixes #3433 2018-12-13 11:15:55 +00:00
Khushboo Vashi dfbb2212c0 Prevent attempts to bulk-drop schema objects. Fixes #3797 2018-12-13 11:03:30 +00:00
Akshay Joshi 52fb8e197f Increase the size of the resize handle of the edit grid text pop-out. Fixes #3083
Allow horizontal sizing of the edit grid text pop-out. Fixes #3805
2018-12-13 10:56:45 +00:00
Dave Page d68eede3e6 Allow query plans to be downloaded as SVG files. Fixes #3589 2018-12-13 10:49:56 +00:00
Murtuza Zabuawala 04735e631e Minor bootstrap 4 fixes:
- Removed 'collapse in' css from wizard as we have 'collapse show' in Bootstrap-4
- Fixed 'Select/Unselect All' button layout for Select2 control used in pgAgent.
2018-12-13 10:28:58 +00:00
Akshay Joshi 90b2d2e536 Update release notes. 2018-12-10 15:07:27 +05:30
Dave Page 3448465e82 Defione Q_NULLPTR for Qt 4. 2018-12-06 11:08:17 +00:00
Dave Page 72a2db53c3 Use Q_NULLPTR instead of nullptr as some of our older build machines don't support C++ 11. 2018-12-06 10:40:49 +00:00
Dave Page 5cfe0ef115 Use C++ style casts. 2018-12-06 10:36:57 +00:00
Dave Page 312bcbc83f Use nullptr instead of NULL or 0. 2018-12-06 10:30:07 +00:00
Dave Page 566ff7b609 Use nullptr instead of NULL or 0. 2018-12-06 10:24:52 +00:00
Dave Page 45cd17af84 Use nullptr instead of NULL or 0. 2018-12-06 10:17:47 +00:00
Khushboo Vashi 12ef55334b Fix encoding test for older Python versions. 2018-12-06 10:15:58 +00:00
Dave Page f2773354c8 Remove blank messages from the Qt project file as they don't work on newer versions of QMake and aren't needed anyway. 2018-12-06 09:50:21 +00:00
Akshay Joshi 431516ad61 Ensure the browser toolbar buttons work in languages other than English. Fixes #3798 2018-12-06 09:25:15 +00:00
Dave Page 1141930178 Allow servers to be pre-loaded into container deployments. Fixes #3801 2018-12-05 17:16:46 +00:00
Dave Page 55402ec7d9 Run Postfix in the container build so passwords can be reset etc. Fixes #3599 2018-12-05 14:44:23 +00:00
Dave Page 980d1e0292 Fix PEP8 issue. 2018-12-04 17:07:41 +00:00
Dave Page 739864c7d1 Update release notes. 2018-12-04 17:04:27 +00:00
Khushboo Vashi 7e3bd8b88a Fix an encoding issue in the query tool. Fixes #3711 2018-12-04 17:03:19 +00:00
Dave Page 6428ffcdaf Fix a minor CSS issue in the file dialogue's upload panel. 2018-12-04 13:12:02 +00:00
Murtuza Zabuawala 660293456c Don't use a hard coded server ID for mocking! 2018-12-04 13:07:35 +00:00
Aditya Toshniwal 0100997aab Hide Radio buttons that should not be shown on the maintenance dialogue. 2018-12-04 11:00:58 +00:00
Dave Page c80b91876a Remove file added in error. 2018-12-04 10:49:11 +00:00
Murtuza Zabuawala f4f0fa0e47 Fix utility route check for Windows. 2018-12-04 10:46:59 +00:00
Aditya Toshniwal 851c0cfff3 Ensure browser toolbar buttons are always shown. 2018-12-03 10:09:36 +00:00
Murtuza Zabuawala 9a3047c89c Add API tests for utility check route. Fixes #3790 2018-11-30 09:56:41 +00:00
Akshay Joshi d801ed5008 Add titles to the code areas of the Query Tool and Debugger to ensure that panels can be re-docked within them. Fixes #3619 2018-11-29 15:47:48 +00:00
Akshay Joshi bdf9f3404f Fix handling of array types as inputs to the debugger. Fixes #3354 2018-11-27 11:18:47 +00:00
Murtuza Zabuawala c79ac2f8d2 Fix some minor CSS issues. 2018-11-27 10:57:30 +00:00
Identifier Anonymous 63f7fbcf7d Update Japanese translation. 2018-11-27 10:54:01 +00:00
Fred Escallier d61fc8b8db Update French translation. 2018-11-27 10:52:01 +00:00
Akshay Joshi 527e084ef7 Bump version number for release 2018-11-26 15:35:26 +05:30
Akshay Joshi b6842e88ac Update message catalogs 2018-11-26 15:31:05 +05:30
Dave Page f0327f5219 Add the ability to import and export server definitions from a config database. Fixes #3772 2018-11-21 16:09:20 +00:00
Akshay Joshi 3cfc3366d7 Fixed the height and width of the Table dialog. 2018-11-21 18:41:03 +05:30
Akshay Joshi 05e067035f Prevent the debugger controls being pressed again before previous processing is complete. Fixes #3734
Note that this needs to be re-visited in the future, as the current fix is somewhat hacky.
2018-11-20 16:35:27 +00:00
Akshay Joshi 8b5abdfa8f Fix changes to the NOT NULL and default value options in the Table Dialogue. Fixes #3742 2018-11-20 16:29:20 +00:00
Dave Page 782b7419f6 Fix toggle breakpoints buttons in the debugger. Fixes #3736 2018-11-20 16:22:56 +00:00
Dave Page bbb8433af3 Don't double-list the connecting page in the index. 2018-11-19 13:55:18 +00:00
Akshay Joshi ef68cae1f1 Properly report errors when debugging cannot be started. Fixes #3723 2018-11-15 15:18:12 -05:00
Akshay Joshi 9b0889842d Fix dropping of multiple functions/procedures at once. Fixes #3746 2018-11-14 08:40:21 -05:00
Akshay Joshi eae18f6f14 Ensure previous notices are not removed from the Messages tab in the Query Tool if an error occurs during query execution. Fixes #3016 2018-11-14 08:27:47 -05:00
Dave Page 29ed7ec881 Fix standalone setup script execution. 2018-11-05 13:39:43 +00:00
Akshay Joshi 220fdf583e Allow use of 0 (integer) and empty strings as parameters in the debugger. Fixes #3629 2018-11-02 16:44:09 +00:00
Dave Page 628f0d254e Fix resource group multi-drop test. 2018-11-01 08:54:33 +00:00
Dave Page 7dde5d52d0 Fix regression test. 2018-10-31 12:18:13 +00:00
Aditya Toshniwal 95cda78bdb Remove some CSS for the body level that isn't required and may cause issues. 2018-10-31 12:13:13 +00:00
Khushboo Vashi e59eaedfd0 Fix buildfarm failures. 2018-10-31 11:35:13 +00:00
Khushboo Vashi f17979141c Add support for dropping multiple objects at once from the collection Properties panel. Fixes #1513 2018-10-31 10:30:37 +00:00
Akshay Joshi 3359a0de7a Allow the selection order to be preserved in the Select2 control to fix column ordering in data Import/Export. Fixes #3029 2018-10-31 10:09:40 +00:00
Identifier Anonymous 6e03775f05 Japanese translation update. 2018-10-31 09:52:49 +00:00
2858 changed files with 131520 additions and 71067 deletions

No files matched your search

+2
View File
@@ -43,3 +43,5 @@ web/pgAdmin/static/js/generated
web/pgadmin/static/js/generated
web/yarn-error.log
/web/cacert.pem
auditjs.html
auditpy.txt
+1 -1
View File
@@ -1,5 +1,5 @@
[pycodestyle]
ignore = E402
ignore = E402,W504,W605
max-line-length = 79
statistics = True
show-source = False
+174
View File
@@ -0,0 +1,174 @@
########################################################################
#
# 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:8-alpine 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 && \
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.7-alpine3.10 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 \
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.4-alpine as pg94-builder
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 alpine:3.10 as tool-builder
# Copy the PG binaries
COPY --from=pg94-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-9.4/
COPY --from=pg94-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-9.4/
COPY --from=pg94-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-9.4/
COPY --from=pg94-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-9.4/
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/
#########################################################################
# Assemble everything into the final container.
#########################################################################
FROM python:3.7-alpine3.10
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
# 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 && \
pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir gunicorn && \
apk del --no-cache build-deps
# 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
# 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 - 2019, 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
+390 -399
View File
@@ -1,399 +1,390 @@
@ECHO off
SETLOCAL
SET WD=%CD%
SET "PGBUILDPATH=%WD%\win-build"
SET CMDOPTION=""
IF "%1" == "clean" SET CMDOPTION="VALID"
IF "%1" == "x86" SET CMDOPTION="VALID"
IF NOT %CMDOPTION%=="VALID" (
GOTO USAGE
)
SET ARCHITECTURE=%1
IF "%ARCHITECTURE%"=="clean" (
CALL :CLEAN
EXIT /B %ERRORLEVEL%
)
REM Main build sequence
CALL :SET_ENVIRONMENT
CALL :VALIDATE_ENVIRONMENT || EXIT /B 1
CALL :CLEAN || EXIT /B 1
CALL :CREATE_VIRTUAL_ENV || EXIT /B 1
CALL :CREATE_RUNTIME_ENV || EXIT /B 1
CALL :CREATE_PYTHON_ENV || EXIT /B 1
CALL :CLEANUP_ENV || EXIT /B 1
CALL :CREATE_INSTALLER || EXIT /B 1
CALL :SIGN_INSTALLER || EXIT /B 1
EXIT /B %ERRORLEVEL%
REM Main build sequence Ends
:CLEAN
ECHO Removing build directory...
IF EXIST "%PGBUILDPATH%" RD "%PGBUILDPATH%" /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
ECHO Removing installer configuration script...
IF EXIST DEL /q "%WD%\pkg\win32\installer.iss" > nul || EXIT /B 1
EXIT /B 0
: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"
REM Set VCREDISTNAME (the filename)
for /f "delims=" %%i in ("%VCREDIST%") do set "VCREDISTNAME=%%~nxi"
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
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
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
SET "PYTHON_VERSION=%PYTHON_MAJOR%%PYTHON_MINOR%"
EXIT /B 0
:VALIDATE_ENVIRONMENT
ECHO ****************************************************************
ECHO S U M M A R Y
ECHO ****************************************************************
ECHO Build path: %PGBUILDPATH%
ECHO Output directory: %TARGET_DIR%
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.
ECHO Qt home: %QTDIR%
ECHO qmake executable: %QMAKE%
ECHO Qt version: %QT_VERSION%
ECHO.
ECHO PostgreSQL home: %PGDIR%
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%
ECHO App name: %APP_NAME%
ECHO ****************************************************************
ECHO Checking the environment...
IF NOT EXIST "%INNOTOOL%" (
ECHO !INNOTOOL! does not exist
ECHO Please install Innotool and set the INNOTOOL 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.
EXIT /B 1
)
IF NOT EXIST "%QTDIR%" (
ECHO !QTDIR! does not exist.
ECHO Please install Qt and set the QTDIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%QMAKE%" (
ECHO !QMAKE! does not exist.
ECHO Please install Qt and set the QTDIR 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.
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.
EXIT /B 1
)
IF NOT EXIST "%PGDIR%" (
ECHO !PGDIR! does not exist.
ECHO Please install PostgreSQL and set the PGDIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PYTHON_HOME%\Scripts\virtualenv.exe" (
ECHO !PYTHON_HOME!\Scripts\virtualenv.exe does not exist.
ECHO Please install the virtualenv package in Python.
EXIT /B 1
)
SET "PATH=%PGDIR%\bin;%PATH%"
EXIT /B 0
:CREATE_VIRTUAL_ENV
ECHO Creating virtual environment...
IF NOT EXIST "%PGBUILDPATH%" MKDIR "%PGBUILDPATH%"
REM If we're using VC++, and this is Python 3.6+, we need a hack for PyCrypto
IF "%MAKE%" == "nmake" (
IF %PYTHON_VERSION% GEQ 36 SET CL=-FI"%VCINSTALLDIR%\INCLUDE\stdint.h"
)
CD "%PGBUILDPATH%"
"%PYTHON_HOME%\Scripts\virtualenv.exe" "%VIRTUALENV%"
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
ECHO Activating virtual environment - %PGBUILDPATH%\%VIRTUALENV%...
CALL "%PGBUILDPATH%\%VIRTUALENV%\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=
)
CD %WD%
EXIT /B 0
:CREATE_RUNTIME_ENV
MKDIR "%PGBUILDPATH%\runtime"
CD "%WD%\web"
ECHO Installing javascript dependencies...
CALL yarn install || EXIT /B 1
ECHO Bundling javascript...
CALL yarn run bundle || EXIT /B 1
ECHO Removing webpack caches...
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
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%PGBUILDPATH%\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
ECHO Removing the test framework...
RD /Q /S "%PGBUILDPATH%\web\regression" 1> nul 2>&1
ECHO Removing tools...
RD /Q /S "%PGBUILDPATH%\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
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 Building docs...
MKDIR "%PGBUILDPATH%\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
ECHO Removing Sphinx
CALL pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
IF %PYTHON_MAJOR% == 2 (
ECHO Fixing backports.csv for Python 2 by adding missing __init__.py
type nul >> "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\backports\__init__.py"
)
IF %PYTHON_MAJOR% == 3 (
ECHO Fixing PyCrypto module for Python 3...
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py" "-o" "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py.new" "-s" "import winrandom" -r "from . import winrandom"
MOVE /Y "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py.new" "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py"
)
ECHO Assembling runtime environment...
CD "%WD%\runtime"
ECHO Running qmake...
CALL "%QMAKE%" || EXIT /B 1
ECHO Cleaning the build directory...
CALL %MAKE% clean || EXIT /B 1
ECHO Running make...
CALL %MAKE% || EXIT /B 1
ECHO Staging pgAdmin4.exe...
COPY "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\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"
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
ECHO Staging VC++ runtime...
MKDIR "%PGBUILDPATH%\installer" || EXIT /B 1
COPY "%VCREDIST%" "%PGBUILDPATH%\installer" > nul || EXIT /B 1
CD %WD%
EXIT /B 0
: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
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%PGBUILDPATH%\%VIRTUALENV%" %%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
ECHO Removing TCL...
RD /Q /S "%PGBUILDPATH%\%VIRTUALENV%\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%"
ECHO Copying icon file...
COPY "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%" > 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%"""
SET ARCMODE=
IF "%ARCHITECTURE%"=="amd64" (
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%"""
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
ECHO Renaming installer...
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGET_DIR%\%INSTALLERNAME%" > nul || EXIT /B 1
ECHO Location - %TARGET_DIR%\%INSTALLERNAME%
ECHO Installer generated successfully.
CD %WD%
EXIT /B 0
:SIGN_INSTALLER
ECHO Attempting to sign the installer...
CALL "%SIGNTOOL%" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGET_DIR%\%INSTALLERNAME%"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
ECHO * Failed to sign the installer
ECHO ************************************************************
PAUSE
)
EXIT /B 0
: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
EXIT /B 0
:USAGE
ECHO Invalid command line options.
ECHO Usage: "Make.bat <x86 | clean>"
ECHO.
EXIT /B 1
@ECHO off
SETLOCAL
SET WD=%CD%
SET "PGBUILDPATH=%WD%\win-build"
SET CMDOPTION=""
IF "%1" == "clean" SET CMDOPTION="VALID"
IF "%1" == "x86" SET CMDOPTION="VALID"
IF NOT %CMDOPTION%=="VALID" (
GOTO USAGE
)
SET ARCHITECTURE=%1
IF "%ARCHITECTURE%"=="clean" (
CALL :CLEAN
EXIT /B %ERRORLEVEL%
)
REM Main build sequence
CALL :SET_ENVIRONMENT
CALL :VALIDATE_ENVIRONMENT || EXIT /B 1
CALL :CLEAN || EXIT /B 1
CALL :CREATE_VIRTUAL_ENV || EXIT /B 1
CALL :CREATE_RUNTIME_ENV || EXIT /B 1
CALL :CREATE_PYTHON_ENV || EXIT /B 1
CALL :CLEANUP_ENV || EXIT /B 1
CALL :CREATE_INSTALLER || EXIT /B 1
CALL :SIGN_INSTALLER || EXIT /B 1
EXIT /B %ERRORLEVEL%
REM Main build sequence Ends
:CLEAN
ECHO Removing build directory...
IF EXIST "%PGBUILDPATH%" RD "%PGBUILDPATH%" /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
ECHO Removing installer configuration script...
IF EXIST DEL /q "%WD%\pkg\win32\installer.iss" > nul || EXIT /B 1
EXIT /B 0
: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"
REM Set VCREDISTNAME (the filename)
for /f "delims=" %%i in ("%VCREDIST%") do set "VCREDISTNAME=%%~nxi"
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
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
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
SET "PYTHON_VERSION=%PYTHON_MAJOR%%PYTHON_MINOR%"
EXIT /B 0
:VALIDATE_ENVIRONMENT
ECHO ****************************************************************
ECHO S U M M A R Y
ECHO ****************************************************************
ECHO Build path: %PGBUILDPATH%
ECHO Output directory: %TARGET_DIR%
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.
ECHO Qt home: %QTDIR%
ECHO qmake executable: %QMAKE%
ECHO Qt version: %QT_VERSION%
ECHO.
ECHO PostgreSQL home: %PGDIR%
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%
ECHO App name: %APP_NAME%
ECHO ****************************************************************
ECHO Checking the environment...
IF NOT EXIST "%INNOTOOL%" (
ECHO !INNOTOOL! does not exist
ECHO Please install Innotool and set the INNOTOOL 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.
EXIT /B 1
)
IF NOT EXIST "%QTDIR%" (
ECHO !QTDIR! does not exist.
ECHO Please install Qt and set the QTDIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%QMAKE%" (
ECHO !QMAKE! does not exist.
ECHO Please install Qt and set the QTDIR 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.
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.
EXIT /B 1
)
IF NOT EXIST "%PGDIR%" (
ECHO !PGDIR! does not exist.
ECHO Please install PostgreSQL and set the PGDIR environment variable.
EXIT /B 1
)
IF NOT EXIST "%PYTHON_HOME%\Scripts\virtualenv.exe" (
ECHO !PYTHON_HOME!\Scripts\virtualenv.exe does not exist.
ECHO Please install the virtualenv package in Python.
EXIT /B 1
)
SET "PATH=%PGDIR%\bin;%PATH%"
EXIT /B 0
:CREATE_VIRTUAL_ENV
ECHO Creating virtual environment...
IF NOT EXIST "%PGBUILDPATH%" MKDIR "%PGBUILDPATH%"
CD "%PGBUILDPATH%"
"%PYTHON_HOME%\Scripts\virtualenv.exe" "%VIRTUALENV%"
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
ECHO Activating virtual environment - %PGBUILDPATH%\%VIRTUALENV%...
CALL "%PGBUILDPATH%\%VIRTUALENV%\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=
)
CD %WD%
EXIT /B 0
:CREATE_RUNTIME_ENV
MKDIR "%PGBUILDPATH%\runtime"
CD "%WD%\web"
ECHO Installing javascript dependencies...
CALL yarn install || EXIT /B 1
ECHO Bundling javascript...
CALL yarn run bundle || EXIT /B 1
ECHO Removing webpack caches...
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
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%PGBUILDPATH%\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
ECHO Removing the test framework...
RD /Q /S "%PGBUILDPATH%\web\regression" 1> nul 2>&1
ECHO Removing tools...
RD /Q /S "%PGBUILDPATH%\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
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 Building docs...
MKDIR "%PGBUILDPATH%\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
ECHO Removing Sphinx
CALL pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
ECHO Assembling runtime environment...
CD "%WD%\runtime"
ECHO Running qmake...
CALL "%QMAKE%" || EXIT /B 1
ECHO Cleaning the build directory...
CALL %MAKE% clean || EXIT /B 1
ECHO Running make...
CALL %MAKE% || EXIT /B 1
ECHO Staging pgAdmin4.exe...
COPY "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\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"
ECHO Staging PostgreSQL components...
COPY "%PGDIR%\bin\libpq.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
IF EXIST "%PGDIR%\bin\libcrypto-1_1.dll" (
REM OpenSSL 1.1.1
COPY "%PGDIR%\bin\libcrypto-1_1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
COPY "%PGDIR%\bin\libssl-1_1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
) ELSE (
REM OpenSSL 1.0.2
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
ECHO Staging VC++ runtime...
MKDIR "%PGBUILDPATH%\installer" || EXIT /B 1
COPY "%VCREDIST%" "%PGBUILDPATH%\installer" > nul || EXIT /B 1
CD %WD%
EXIT /B 0
: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
ECHO Cleaning up unnecessary .pyc and .pyo files...
FOR /R "%PGBUILDPATH%\%VIRTUALENV%" %%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
ECHO Removing TCL...
RD /Q /S "%PGBUILDPATH%\%VIRTUALENV%\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%"
ECHO Copying icon file...
COPY "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%" > 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%"""
SET ARCMODE=
IF "%ARCHITECTURE%"=="amd64" (
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%"""
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
ECHO Renaming installer...
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGET_DIR%\%INSTALLERNAME%" > nul || EXIT /B 1
ECHO Location - %TARGET_DIR%\%INSTALLERNAME%
ECHO Installer generated successfully.
CD %WD%
EXIT /B 0
:SIGN_INSTALLER
ECHO Attempting to sign the installer...
CALL "%SIGNTOOL%" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGET_DIR%\%INSTALLERNAME%"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
ECHO * Failed to sign the installer
ECHO ************************************************************
PAUSE
)
EXIT /B 0
: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
EXIT /B 0
:USAGE
ECHO Invalid command line options.
ECHO Usage: "Make.bat <x86 | clean>"
ECHO.
EXIT /B 1
+35 -10
View File
@@ -20,7 +20,13 @@ 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
cd web && yarn audit
rm -f package-lock.json
rm -f web/package-lock.json
bundle:
cd web && yarn run bundle
@@ -31,15 +37,33 @@ 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:
cd web && yarn run auditjs
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
@@ -53,21 +77,19 @@ 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-dist clean-docs clean-node clean-pip 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-dist:
rm -rf dist/
@@ -84,7 +106,7 @@ clean-src:
rm -rf src-build/
docker:
./pkg/docker/build.sh
docker build `python -c 'import web.config as c; print("-t {0} -t {0}:latest -t {0}:{1} -t {0}:{1}.{2}".format(c.APP_NAME.replace(" ", "").lower(), c.APP_RELEASE, c.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 +114,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:
+3 -3
View File
@@ -26,8 +26,8 @@ Building the Runtime
To build the runtime, the following packages must be installed:
- QT 4.6 or above
- Python 2.6, 2.7 or 3.4+
- QT 4.6 or above (Use the VC++ build on Windows, not MinGW).
- Python 2.7 or 3.4+
Assuming both qmake and python-config are in the path:
@@ -88,7 +88,7 @@ Configuring the Python Environment
----------------------------------
In order to run the Python code, a suitable runtime environment is required.
Python versions - Python 2.6, 2.7 or 3.3+ are currently supported. It is
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:
-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.
+22 -18
View File
@@ -11,10 +11,10 @@ else:
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 +32,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 +61,24 @@ def print_code(outstream, name, module, info=None):
print_code(
target, "PgAdminModule", PgAdminModule,
"""
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.
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.
+8 -8
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,7 +25,7 @@ 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
@@ -34,7 +34,7 @@ a web server; these can be overriden in **config_local.py** 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 +57,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 +68,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
@@ -190,7 +190,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 +202,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),
+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 - 2018, The pgAdmin Development Team
Copyright (C) 2013 - 2019, 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 - 2018, The pgAdmin Development Team
# Copyright (C) 2013 - 2019, 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_FR.utf8. 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* 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.
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.
+76
View File
@@ -0,0 +1,76 @@
.. _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.
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.
+76 -63
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,7 +12,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import os
import sys
if sys.version_info[0] >= 3:
import builtins
@@ -29,15 +31,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 +49,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,79 +69,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': '#2C76B4',
'sidebarbgcolor': '#E2E2E2',
'sidebarbtncolor': '#2C76B4',
'sidebartextcolor': '#000',
'sidebarlinkcolor': '#337AB7',
'footerbgcolor': '#333',
'codebgcolor': '#D9EDF7',
'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,
@@ -148,30 +154,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
@@ -185,55 +191,62 @@ 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', u'pgAdmin 4 Documentation',
u'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).
+34
View File
@@ -0,0 +1,34 @@
.. _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.
.. 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.
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.
+29 -10
View File
@@ -1,30 +1,49 @@
.. _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 Postgres server, you must define a connection to the server. You can (optionally) use the *Server Group* dialog to create server groups to organize 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:
Before you can use the pgAdmin client to manage the objects that reside on your
Postgres server, you must define a connection to the server. You can
(optionally) use the *Server Group* dialog to create server groups to organize
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.
.. toctree::
server_group_dialog
Use the fields on the *Server* dialog to define the connection properties for 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:
Use the fields on the *Server* dialog to define the connection properties for
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.
.. toctree::
server_dialog
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.
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.
Contents:
.. 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.
.. toctree::
connect_to_server
connect_error
connect_error
Server definitions (and their groups) can be exported to a JSON file and
re-imported to the same or a different system to enable easy pre-configuration
of pgAdmin.
.. toctree::
import_export_servers
+344
View File
@@ -0,0 +1,344 @@
.. _container_deployment:
*****************************
`Container Deployment`:index:
*****************************
pgAdmin can be deployed in a container using the image at:
https://hub.docker.com/r/dpage/pgadmin4/
PostgreSQL Utilities
********************
The PostgreSQL utilities *pg_dump*, *pg_dumpall*, *pg_restore* and *psql* are
included in the container to allow backups to be created and restored and other
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*
The most recent version of the utilities is used by default; this may be
changed in the :ref:`preferences`.
Environment Variables
*********************
The container will accept the following variables at startup:
**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**
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**
*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
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
**PGADMIN_LISTEN_ADDRESS**
*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.
**PGADMIN_LISTEN_PORT**
*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.
**PGADMIN_SERVER_JSON_FILE**
*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_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:
**/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**
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. Settings in config_local.py will also override anything specified in
the container environment through *PGADMIN_CONFIG_* prefixed variables.
**/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. 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**
If TLS is enabled, this file will be used as the servers TLS certificate.
**/certs/server.key**
If TLS is enabled, this file will be used as the key file for the servers TLS
certificate.
Examples
********
Run a simple container over port 80:
.. code-block:: bash
docker pull dpage/pgadmin4
docker run -p 80:80 \
-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
/private/var/lib/pgadmin on the host, and servers pre-loaded from
/tmp/servers.json on the host:
.. code-block:: bash
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 \
-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" \
-d dpage/pgadmin4
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.crt;
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::
+63 -25
View File
@@ -4,82 +4,120 @@
`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.
* 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 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 *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.
+80 -28
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:
shared_preload_libraries = '$libdir/*other_libraries*/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,35 @@ 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.
.. 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 +116,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
+12 -8
View File
@@ -1,15 +1,19 @@
.. _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 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:
Pre-compiled and configured installation packages for pgAdmin 4 are available
for a number of desktop environments; we recommend using an installer whenever
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.
.. toctree::
:maxdepth: 2
config_py
desktop_deployment
server_deployment
server_deployment
container_deployment
+17 -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,19 @@ 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. |
+--------------------------+--------------------+---------------------------------------------------------------+
| PythonPath | String | The Python module search path |
+--------------------------+--------------------+---------------------------------------------------------------+
+5 -4
View File
@@ -4,12 +4,13 @@
`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
+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.
+78 -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
+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 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.
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.
+55 -18
View File
@@ -4,70 +4,107 @@
`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.
* 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 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.
+42 -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,59 @@ 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.
* 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 *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.
+93 -33
View File
@@ -4,105 +4,165 @@
`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.
* 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.
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.
+119 -51
View File
@@ -4,115 +4,183 @@
`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.
* 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 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 -28
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,24 @@ 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
.. note:: Pre-compiled and configured installation packages are available for
a number of platforms. These packages should be used by end-users whereever
@@ -61,30 +57,24 @@ tool and the debugger). pgAdmin opens additional feature tabs each time you
access the extended functionality offered by pgAdmin tools; you can open, close,
and re-arrange feature tabs as needed.
Use the *Preferences* dialog to customize the content and colors of the pgAdmin
Use the *Preferences* dialog to customize the content and behaviour of the pgAdmin
display. To open the *Preferences* dialog, select *Preferences* from the *File* menu.
*Help* buttons in the lower-left corner of each dialog will open the online help
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:
.. 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
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*:
Contents:
.. toctree::
connecting
connection to the server; for more information please see *Connecting to a Server*
in the next section.
+55 -17
View File
@@ -4,51 +4,89 @@
`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.
* 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.
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.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 36 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 58 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 299 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 46 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 32 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 166 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 29 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 48 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB

After

Width:  |  Height:  |  Size: 184 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Regular → Executable
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 47 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Regular → Executable
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 31 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 24 KiB

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