Compare commits

..
151 Commits
Author SHA1 Message Date
Fred Escallier 00ebc58795 Update French translation. 2019-11-12 20:01:34 +05:30
Aditya Toshniwal 79e04d5e23 Customize the scrollbar stying. Added new SASS variable to change the color as per theme. 2019-11-12 19:38:35 +05:30
Aditya Toshniwal 636ab29669 Further changes to the welcome dashboard for theme customization. 2019-11-12 17:53:52 +05:30
Akshay Joshi fb87920bbb Fixed docker container exit issue occurs due to change in Gunicorn's latest version.
Updated Dockerfile and hardcoded Gunicorn version to 19.9.0

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

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

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

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

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

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

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

Code is changed to add escapers.

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

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

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

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

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

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

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

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

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

Corrected the implementation of BooleanCellFormatter.

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

Quoting not added for the 'search_path' parameter.

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

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

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

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

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

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

Re-arrange editor options in the Preferences dialogue to tidy things up.
2019-09-04 15:46:08 +01:00
Akshay Joshi 5e54f20578 Add Reverse Engineered and Modified SQL tests for Foreign Tables. Fixes #4618. 2019-09-04 18:33:07 +05:30
Ashesh Vashi 2d4429fa64 Update yarn.lock to update the vulnerable javascripts
i.e.
eslint-utils >= 1.4.1
2019-09-04 10:20:28 +05:30
Ganesh Jaybhay 85baa22ca1 Added Modified SQL test cases for FTS Configurations. 2019-09-03 17:42:44 +05:30
navnath gadakh 4690700a24 Added Modified SQL test cases for Packages. 2019-09-03 17:33:57 +05:30
Akshay Joshi 4745ad56e9 1) Add Reverse Engineered and Modified SQL tests for Foreign Servers. Fixes #4617
2) Add Reverse Engineered and Modified SQL tests for User Mappings. Fixes #4627
2019-09-03 16:27:41 +05:30
Aditya Toshniwal 04357b7a55 Fix error while importing data to a table using Import/Export dialog and providing Not null columns option. Fixes #4461. 2019-09-03 11:19:33 +05:30
Shubham Agarwal a0f6e5272a Add MSQL test cases for FTS Parser. 2019-09-03 10:28:11 +05:30
Murtuza Zabuawala eeeb350ed2 Add Modified SQL tests for Resource Group. Fixes #4690 2019-09-03 10:18:09 +05:30
Aditya Toshniwal a68f0702e2 Re-fix database name unescaping the query tool title bar. 2019-09-02 16:57:28 +01:00
Domenico Sgarbossa 60a6c501fb Add an Italian translation. 2019-09-02 13:35:32 +01:00
Akshay Joshi 5ff3f40116 Add Reverse Engineered and Modified SQL tests for FTS Templates. Fixes #4619 2019-09-02 15:24:41 +05:30
Akshay Joshi 662266a367 Added MSQL test cases for Cast and Language. 2019-09-02 14:11:59 +05:30
Aditya Toshniwal bc91a7c7b2 Increase cache control max age for static files to improve performance over longer run. Fixes #4681 2019-09-02 12:17:43 +05:30
Neel Patel 0ca65d7cfe Added MSQL test cases for Domain. 2019-09-02 11:52:19 +05:30
Aditya Toshniwal 47f26cc377 Fix exception in query history for python 2.7. Fixes #4663 2019-08-30 09:07:03 +05:30
Akshay Joshi e0c53e7d1d Add Reverse Engineered SQL tests for Schemas. Fixes #4575 2019-08-29 18:32:08 +05:30
Aditya Toshniwal d6da1cf25c Added MSQL test cases for Sequences and cover missing ACL RE-SQL test cases. 2019-08-29 14:15:34 +05:30
Shubham Agarwal fc4bef56a0 Further code refactoring to stabilise the Feature Tests. Fixes #3936 2019-08-28 18:04:08 +05:30
Aditya Toshniwal 028473eb83 Fix an issue where oid column should not be pasted when copy/paste row is used on query output containing the oid column. Fixes #4381 2019-08-28 13:35:40 +05:30
Usman Muzaffar ac298b03c0 1) Add Reverse Engineered SQL tests for Views. Fixes #4576
2) Ensure View should be created with special characters. Fixes #4486
2019-08-28 12:48:59 +05:30
Aditya Toshniwal 06ad6b8ba8 1) Ensure Boolean columns should be editable using keyboard keys. Fixes #3778
2) Ensure Boolean columns should be editable in View/Edit data and Query Tool. Fixes #4487
2019-08-28 11:09:30 +05:30
Aditya Toshniwal dbbbb2e5ed Fix query tool launch error if user name contain html characters. Fixes #4674 2019-08-28 10:46:28 +05:30
Akshay Joshi 28b741a13a Fixed timezone issue in RE-SQL test cases for Roles. 2019-08-27 19:54:30 +05:30
Murtuza Zabuawala 1ddc9cc889 Modified RE-SQL test to cover Password, Account Expire, Connection Limit and Variables for Roles. 2019-08-26 18:25:48 +05:30
Aditya Toshniwal 53ab4d7e8d Fix an error that could be seen when click on any system column of a table. Fixes #4577 2019-08-26 14:36:07 +05:30
Yosry Muhammad f8f7d5ac6f Ensure editable and read-only columns in Query Tool should be identified by icons and tooltips in the column header. Fixes #4667 2019-08-26 14:17:40 +05:30
Yosry Muhammad 5887fb3815 Some refactoring of sqleditor.js. 2019-08-23 16:15:43 +01:00
Aditya Toshniwal 234efc3be7 Don't wait for the database connection before rendering the Query Tool UI, for improved UX. Fixes #4453
In addition, unescape HTML entities in database names in the Query Tool title bar. Fixes #4584
2019-08-23 12:14:20 +01:00
Dave Page 25f85fe123 Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container. Fixes #4657 2019-08-23 09:53:24 +01:00
Aditya Toshniwal 3dadb8989b Fix a debugger error when using Python 2.7. Fixes #4419
Also fixes a minor bug where a reload warning was unnecessarily given when closing the debugger.
2019-08-23 09:43:51 +01:00
Akshay Joshi 232fe286ee Fix SQL tab issue for Views. It's a regression of compound triggers. Fixes #4650 2019-08-23 10:22:20 +05:30
Dave Page 6192c48ef9 Further tweaks for formatting. 2019-08-22 15:41:24 +01:00
Dave Page 92aabb215f Improve formatting. 2019-08-22 15:34:04 +01:00
Dave Page c76b30e353 Allow configuration options to be set from the environment in the container distribution. Fixes #4651 2019-08-22 15:24:04 +01:00
Dave Page 1795141aec Minor doc styling tweaks. 2019-08-22 15:11:59 +01:00
Shubham Agarwal 9f455a514e Feature test improvement and fix intermittent failures part of #3936 2019-08-22 14:50:51 +05:30
Akshay Joshi 7090c02014 Move schema precondition logic into separate function for RE-SQL. 2019-08-21 18:12:33 +05:30
Neel Patel dc64ce331a Fix length and precision enable/disable issue when changing the data type for Domain node. Fixes #4644. 2019-08-21 16:27:23 +05:30
Akshay Joshi 094e5577e8 Add Reverse Engineered SQL tests for Rules. Fixes #4600 2019-08-21 16:06:05 +05:30
Akshay Joshi 41e2a674e3 Fix Truncate option deselect issue for compound triggers. Fixes #4643 2019-08-20 17:09:26 +05:30
Akshay Joshi bdff046c57 1) Added ProjectSet icon for explain module. Fixes #2706
2) Added Gather Merge, Named Tuple Store Scan and Table Function Scan icon for explain module. Fixes #2828
2019-08-20 16:47:53 +05:30
856 changed files with 42139 additions and 15458 deletions

No files matched your search

+1
View File
@@ -36,6 +36,7 @@ runtime/pgAdmin4_resource.rc
runtime/release/
runtime/ui_BrowserWindow.h
web/config_local.py
web/pgadmin/misc/themes/pgadmin.themes.json
web/geckodriver.log
web/regression/test_config.json
node_modules/
+184
View File
@@ -0,0 +1,184 @@
########################################################################
#
# 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 postgres:12-alpine as pg12-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/
COPY --from=pg12-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-12/
COPY --from=pg12-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-12/
#########################################################################
# Assemble everything into the final container.
#########################################################################
FROM python:3.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==19.9.0 && \
apk del --no-cache build-deps
# We need the v12 libpq, which is only in the 'edge' build of Alpine at present
COPY --from=pg12-builder /usr/local/lib/libpq.so.5.12 /usr/lib/
RUN ln -sf /usr/lib/libpq.so.5.12 /usr/lib/libpq.so.5
# Copy the runner script
COPY pkg/docker/run_pgadmin.py /pgadmin4
COPY pkg/docker/entrypoint.sh /entrypoint.sh
# Precompile and optimize python code to save time and space on startup
RUN python -O -m compileall -x node_modules /pgadmin4
# Finish up
VOLUME /var/lib/pgadmin
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
+7 -5
View File
@@ -9,6 +9,10 @@
SHELL = /bin/sh
APP_NAME := $(shell grep ^APP_NAME web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]' | tr -d "'" | awk '{print tolower($$0)}')
APP_RELEASE := $(shell grep ^APP_RELEASE web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
APP_REVISION := $(shell grep ^APP_REVISION web/config.py | awk -F"=" '{print $$NF}' | tr -d '[:space:]')
#########################################################################
# High-level targets
#########################################################################
@@ -77,7 +81,7 @@ 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/*
@@ -90,9 +94,6 @@ clean-runtime:
clean-appbundle:
rm -rf mac-build/
clean-docker:
rm -rf docker-build/
clean-dist:
rm -rf dist/
@@ -109,7 +110,8 @@ clean-src:
rm -rf src-build/
docker:
./pkg/docker/build.sh
echo $(APP_NAME)
docker build -t ${APP_NAME} -t $(APP_NAME):latest -t $(APP_NAME):$(APP_RELEASE) -t $(APP_NAME):$(APP_RELEASE).$(APP_REVISION) .
docs:
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html
+17
View File
@@ -219,6 +219,23 @@ can be used:
C:\$PGADMIN4_SRC\web> yarn install
C:\$PGADMIN4_SRC\web> yarn run bundle
Creating pgAdmin themes
-----------------------
To create a pgAdmin theme, you need to create a directory under
web/pgadmin/static/scss/resources.
Copy the sample file _theme.variables.scss.sample to the new directory and
rename it to _theme.variables.scss. Change the desired hexadecimal values of
the colors and bundle pgAdmin. You can also add a preview image in the theme
directory with the name as <dir name>_preview.png. It is recommended that the
preview image should not be larger in size as it may take time to load on slow
networks. Run the yarn run bundle and you're good to go. No other changes are
required, pgAdmin bundle will read the directory and create other required
entries to make them available in preferences.
The name of the theme is derived from the directory name. Underscores (_) and
hyphens (-) will be replaced with spaces and the result will be camel cased.
Configuring the Runtime
-----------------------
+7
View File
@@ -24,6 +24,13 @@ Use the fields in the *General* tab to identify the compound trigger:
The name will be displayed in the *pgAdmin* tree control.
* Store notes about the compound trigger in the *Comment* field.
.. image:: images/compound_trigger_general_enabled.png
:alt: Trigger enabled in dialog tab
:align: center
* *Trigger enabled* field is available in compound trigger dialog once the trigger is created.
You can select one of the four options available.
Click the *Events* tab to continue.
.. image:: images/compound_trigger_events.png
+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
+87 -27
View File
@@ -22,6 +22,7 @@ server:
* PostgreSQL 9.6: */usr/local/pgsql-9.6*
* PostgreSQL 10: */usr/local/pgsql-10*
* PostgreSQL 11: */usr/local/pgsql-11*
* PostgreSQL 12: */usr/local/pgsql-12*
The most recent version of the utilities is used by default; this may be
changed in the :ref:`preferences`.
@@ -31,19 +32,19 @@ Environment Variables
The container will accept the following variables at startup:
*PGADMIN_DEFAULT_EMAIL*
**PGADMIN_DEFAULT_EMAIL**
This is the email address used when setting up the initial administrator account
to login to pgAdmin. This variable is required and must be set at launch time.
*PGADMIN_DEFAULT_PASSWORD*
**PGADMIN_DEFAULT_PASSWORD**
This is the password used when setting up the initial administrator account to
login to pgAdmin. This variable is required and must be set at launch time.
*PGADMIN_ENABLE_TLS*
**PGADMIN_ENABLE_TLS**
Default: <null>
*Default: <null>*
If left un-set, the container will listen on port 80 for connections in plain
text. If set to any value, the container will listen on port 443 for TLS
@@ -53,36 +54,51 @@ 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*
**PGADMIN_LISTEN_ADDRESS**
Default: [::]
*Default: [::]*
Specify the local address that the servers listens on. The default should work
for most users - in IPv4-only environments, this may need to be set to
127.0.0.1.
*PGADMIN_LISTEN_PORT*
**PGADMIN_LISTEN_PORT**
Default: 80 or 443 (if TLS is enabled)
*Default: 80 or 443 (if TLS is enabled)*
Allows the port that the server listens on to be set to a specific value rather
than using the default.
*PGADMIN_SERVER_JSON_FILE*
**PGADMIN_SERVER_JSON_FILE**
Default: /pgadmin4/servers.json
*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*
**GUNICORN_THREADS**
Default: 25
*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
****************************
@@ -90,20 +106,21 @@ 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*
**/var/lib/pgadmin**
This is the working directory in which pgAdmin stores session data, user files,
configuration files, and it's configuration database. Mapping this directory
onto the host machine gives you an easy way to maintain configuration between
invocations of the container.
*/pgadmin4/config_local.py*
**/pgadmin4/config_local.py**
This file can be used to override configuration settings in pgAdmin. Settings
found in config.py can be overridden with deployment specific values if
required.
required. Settings in config_local.py will also override anything specified in
the container environment through *PGADMIN_CONFIG_* prefixed variables.
*/pgadmin4/servers.json*
**/pgadmin4/servers.json**
If this file is mapped, server definitions found in it will be loaded at launch
time. This allows connection information to be pre-loaded into the instance of
@@ -111,11 +128,11 @@ pgAdmin in the container. Note that server definitions are only loaded on first
launch, i.e. when the configuration database is created, and not on subsequent
launches using the same configuration database.
*/certs/server.cert*
**/certs/server.cert**
If TLS is enabled, this file will be used as the servers TLS certificate.
*/certs/server.key*
**/certs/server.key**
If TLS is enabled, this file will be used as the key file for the servers TLS
certificate.
@@ -129,8 +146,21 @@ Run a simple container over port 80:
docker pull dpage/pgadmin4
docker run -p 80:80 \
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-d dpage/pgadmin4
Run a simple container over port 80, setting some configuration options:
.. code-block:: bash
docker pull dpage/pgadmin4
docker run -p 80:80 \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-e 'PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True' \
-e 'PGADMIN_CONFIG_LOGIN_BANNER="Authorised users only!"' \
-e 'PGADMIN_CONFIG_CONSOLE_LOG_LEVEL=10' \
-d dpage/pgadmin4
Run a TLS secured container using a shared config/storage directory in
@@ -141,13 +171,13 @@ Run a TLS secured container using a shared config/storage directory in
docker pull dpage/pgadmin4
docker run -p 443:443 \
-v "/private/var/lib/pgadmin:/var/lib/pgadmin" \
-v "/path/to/certificate.cert:/certs/server.cert" \
-v "/path/to/certificate.key:/certs/server.key" \
-v "/tmp/servers.json:/servers.json" \
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-e "PGADMIN_ENABLE_TLS=True" \
-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
@@ -168,6 +198,36 @@ for example:
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-d dpage/pgadmin4
pgAdmin X-Forwarded-* Configuration
-----------------------------------
pgAdmin needs to understand how many proxies set each header so it knows what
values to trust. The configuration parameters for the X-Forwarded-* options
which are used for this purpose are shown below, along with their default
values.
pgAdmin is configured by default to be able to run behind a reverse proxy even
on a non-standard port and these config options don't normally need to be
changed. If you're running an unusual configuration (such as multiple reverse
proxies) you can adjust the configuration to suit.
.. code-block:: python
# Number of values to trust for X-Forwarded-For
PROXY_X_FOR_COUNT = 1
# Number of values to trust for X-Forwarded-Proto.
PROXY_X_PROTO_COUNT = 0
# Number of values to trust for X-Forwarded-Host.
PROXY_X_HOST_COUNT = 0
# Number of values to trust for X-Forwarded-Port.
PROXY_X_PORT_COUNT = 1
# Number of values to trust for X-Forwarded-Prefix.
PROXY_X_PREFIX_COUNT = 0
HTTP via Nginx
--------------
+3 -2
View File
@@ -12,7 +12,8 @@ will provide detailed information about creating a custom deployment.
.. toctree::
:maxdepth: 2
config_py
desktop_deployment
server_deployment
container_deployment
container_deployment
+2 -24
View File
@@ -36,32 +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. 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.
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
+7 -2
View File
@@ -35,6 +35,8 @@ disabled in either mode. Please see
:ref:`The Query Tool Toolbar <query_tool_toolbar>` for a description of the
available controls.
.. _data-grid:
The Data Grid
*************
@@ -42,8 +44,6 @@ 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].
.. _modifying-data-grid:
To modify the displayed data:
* To change a numeric value within the grid, double-click the value to select
@@ -138,3 +138,8 @@ To delete a row from the grid, click the trash icon.
* Click the *Help* button (?) to access online help.
* Click the *Ok* button to save work.
* Click the *Close* button to discard current changes and close the dialog.
.. toctree::
:maxdepth: 2
viewdata_filter
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 79 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 100 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 104 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 143 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

+3 -1
View File
@@ -57,7 +57,7 @@ following options (in alphabetical order):
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Delete/Drop* | Click to delete the currently selected object from the server. |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Disconnect Server...* | Click to refresh the currently selected object. |
| *Disconnect Server...* | Click to disconnect the currently selected server. |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Drop Cascade* | Click to delete the currently selected object and all dependent objects from the server. |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
@@ -65,6 +65,8 @@ following options (in alphabetical order):
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Refresh...* | Click to refresh the currently selected object. |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Remove Server* | Click to remove the currently selected server. |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Scripts* | Click to open the :ref:`Query tool <query_tool>` to edit or view the selected script from the flyout menu. |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+
| *Trigger(s)* | Click to *Disable* or *Enable* trigger(s) for the currently selected table. Options are displayed on the flyout menu. |
+43 -18
View File
@@ -34,6 +34,10 @@ Use the fields on the *Display* panel to specify general display preferences:
saving interval. A value of *-1* will disable the treeview state saving
functionality.
* When the *Confirm before closing properties with unsaved changes* switch is set to *True*,
pgAdmin will warn you before closing the properties dialog of an object if there
are any unsaved changes. On user confirmation, the properties dialog will close.
* When the *Confirm on close or refresh* switch is set to *True*, pgAdmin will
attempt to catch browser close or refresh events and prompt before allowing
them to continue.
@@ -174,6 +178,14 @@ Expand the *Miscellaneous* node to specify miscellaneous display preferences.
* Use the *User language* drop-down listbox to select the display language for
the client.
.. image:: images/preferences_misc_themes.png
:alt: Preferences dialog themes section
:align: center
* Use the *Themes* drop-down listbox to select the theme for pgAdmin. You'll also get a preview just below the
drop down. Note that, to apply the theme you need to refresh the pgAdmin page. You can also submit your
own themes, check `here <https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob_plain;f=README>`_ how.
The Paths Node
**************
@@ -268,6 +280,37 @@ Tool display.
a positive value above zero is specified, the notifier will be displayed for
the specified number of seconds. The default is *5*.
.. image:: images/preferences_sql_editor.png
:alt: Preferences dialog sqleditor editor settings
:align: center
Use the fields on the *Editor* panel to change settings of the query editor.
* When the *Brace matching?* switch is set to *True*, the editor will highlight
pairs of matched braces.
* When the *Code folding?* switch is set to *False*, the editor will disable
code folding. Disabling will improve editor performance with large files.
* Use the *Font size* field to specify the font size that will be used in text
boxes and editors.
* When the *Insert bracket pairs?* switch is set to *True*, the editor will
automatically insert paired brackets.
* When the *Line wrapping* switch is set to *True*, the editor will implement
line-wrapping behavior.
* When the *Plain text mode?* switch is set to *True*, the editor mode will be
changed to text/plain. Keyword highlighting and code folding will be disabled.
This will improve editor performance with large files.
* Use the *Tab size* field to specify the number of spaces per tab character in
the editor.
* When the *Use spaces* switch is set to *True*, the editor will insert spaces
(instead of tab characters) when the tab key or auto-indent are used.
.. image:: images/preferences_sql_explain.png
:alt: Preferences dialog sqleditor explain options
:align: center
@@ -300,18 +343,6 @@ Use the fields on the *Options* panel to manage editor preferences.
* When the *Auto-Rollback?* switch is set to *True*, failed queries are rolled
back.
* When the *Brace matching?* switch is set to *True*, the editor will highlight
pairs of matched braces.
* Use the *Font size* field to specify the font size that will be used in text
boxes and editors.
* When the *Insert bracket pairs?* switch is set to *True*, the editor will
automatically insert paired brackets.
* When the *Line wrapping* switch is set to *True*, the editor will implement
line-wrapping behavior.
* When the *Prompt to save unsaved data changes?* switch is set to *True*, the
editor will prompt the user to saved unsaved data when exiting the data
editor.
@@ -324,12 +355,6 @@ Use the fields on the *Options* panel to manage editor preferences.
*True*, the editor will prompt the user to commit or rollback changes when
exiting the Query Tool while the current transaction is not committed.
* Use the *Tab size* field to specify the number of spaces per tab character in
the editor.
* When the *Use spaces* switch is set to *True*, the editor will insert spaces
(instead of tab characters) when the tab key or auto-indent are used.
.. image:: images/preferences_sql_results_grid.png
:alt: Preferences dialog sql results grid section
:align: center
+85 -18
View File
@@ -16,8 +16,8 @@ allows you to:
:ref:`updatable <updatable-result-set>`.
* Displays current connection and transaction status as configured by the user.
* Save the data displayed in the output panel to a CSV file.
* Review the execution plan of a SQL statement in either a text or a graphical
format.
* Review the execution plan of a SQL statement in either a text, a graphical
format or a table format (similar to https://explain.depesz.com).
* View analytical information about a SQL statement.
@@ -130,15 +130,27 @@ You can:
A result set is updatable if:
* All the columns belong to the same table.
* All the primary keys or OIDs of the table are explicitly selected.
* No columns are duplicated.
* All columns are either selected directly from a single table, or
are not table columns at all (e.g. concatenation of 2 columns).
Only columns that are selected directly from the table are
editable, other columns are read-only.
* All the primary key columns or OIDs of the table are selected in the
result set.
Any columns that are renamed or selected more than once are also read-only.
Editable and read-only columns are identified using pencil and lock icons
(respectively) in the column headers.
.. image:: images/query_tool_editable_columns.png
:alt: Query tool editable and read-only columns
:align: center
The psycopg2 driver version should be equal to or above 2.8 for updatable
query result sets to work.
An updatable result set can be modified just like in
:ref:`View/Edit Data <modifying-data-grid>` mode.
An updatable result set is identical to the :ref:`Data Grid <data-grid>` in
View/Edit Data mode, and can be modified in the same way.
If Auto-commit is off, the data changes are made as part of the ongoing
transaction, if no transaction is ongoing a new one is initiated. The data
@@ -154,20 +166,31 @@ All rowsets from previous queries or commands that are displayed in the *Data
Output* panel will be discarded when you invoke another query; open another
Query Tool tab to keep your previous results available.
Use the *Explain* tab to view a graphical representation of a query:
Explain Panel
*************
.. image:: images/query_output_explain.png
:alt: Query tool explain panel
To generate the *Explain* or *Explain Analyze* plan of a query, click on
*Explain* or *Explain Analyze* button in the toolbar.
More options related to *Explain* and *Explain Analyze* can be selected from
the drop down on the right side of *Explain Analyze* button in the toolbar.
.. image:: images/query_toolbar_explain.png
:alt: Query tool toolbar explain button
:align: center
To generate a graphical explain diagram, open the *Explain* tab, and select
*Explain*, *Explain Analyze*, or one or more options from the *Explain options*
drop-down. Please note that *EXPLAIN VERBOSE*
cannot be displayed graphically. Hover over an icon on the *Explain* tab to
review information about that item; a popup window will display information
about the selected object. For information on JIT statistics, triggers and a
summary, hover over the icon on top-right corner; a similar popup window will
be displayed when appropriate.
Please note that pgAdmin generates the *Explain [Analyze]* plan in JSON format.
On successful generation of *Explain* plan, it will create three tabs/panels
under the Explain panel.
* Graphical
Please note that *EXPLAIN VERBOSE* cannot be displayed graphically. Hover over
an icon on the *Graphical* tab to review information about that item; a popup
window will display information about the selected object. For information on
JIT statistics, triggers and a summary, hover over the icon on top-right
corner; a similar popup window will be displayed when appropriate.
Use the download button on top left corner of the *Explain* canvas to download
the plan as an SVG file.
@@ -181,6 +204,44 @@ the plan as an SVG file.
Note that the query plan that accompanies the *Explain analyze* is available on
the *Data Output* tab.
* Table
*Table* tab shows the plan details in table format, it generates table format
similar to *explain.depsez.com*. Each row of the table represent the data for a
*Explain Plan Node*. It may contain the node information, exclusive timing,
inclusive timing, actual vs planned rows differences, actual rows, planned
rows, loops.
background color of the exclusive, inclusive, and Rows X columns may vary based on the
difference between actual vs planned.
If percentage of the exclusive/inclusive timings of the total query time is:
> 90 - Red color
> 50 - Orange (between red and yellow) color
> 10 - Yellow color
If planner mis-estimated number of rows (actual vs planned) by
10 times - Yellow color
100 times - Orange (between Red and Yellow) color
1000 times - Red color
.. image:: images/query_explain_analyze_table.png
:alt: Query tool explain plan table
:align: center
* Statistics
*Statistics* tab shows two tables:
1. Statistics per Plan Node Type
2. Statistics per Table
.. image:: images/query_explain_analyze_statistics.png
:alt: Query tool explain plan statistics
:align: center
Messages Panel
**************
Use the *Messages* tab to view information about the most recently executed
query:
@@ -197,6 +258,9 @@ query took to complete and how many rows were retrieved:
:alt: Query tool output information
:align: center
Query History Panel
*******************
Use the *Query History* tab to review activity for the current session:
.. image:: images/query_output_history.png
@@ -225,6 +289,9 @@ retained. By default, the last 20 queries are stored for each database. This
can be adjusted in `config_local.py` by overriding the `MAX_QUERY_HIST_STORED`
value. See the :ref:`Deployment <deployment>` section for more information.
Connection Status
*****************
Use the *Connection status* feature to view the current connection and
transaction status by clicking on the status icon in the Query Tool:
+183 -172
View File
@@ -1,172 +1,183 @@
.. _query_tool_toolbar:
***************************
`Query Tool Toolbar`:index:
***************************
The *Query Tool* toolbar uses context-sensitive icons that provide shortcuts to
frequently performed tasks. If an icon is highlighted, the option is enabled;
if the icon is grayed-out, the task is disabled.
.. note:: 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.
.. image:: images/query_toolbar.png
:alt: Query tool toolbar
:align: center
Hover over an icon in pgAdmin to display a tooltip that describes the icon's
functionality.
File Options
************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Open File* | Click the *Open File* icon to display a previously saved query in the SQL Editor. | Accesskey + O |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Save File* | Click the *Save* icon to perform a quick-save of a previously saved query, or to access the | Accesskey + S |
| | *Save* menu: | |
| | | |
| | * Select *Save* to save the selected content of the SQL Editor panel in a file. | |
| | | |
| | * Select *Save As* to open a new browser dialog and specify a new location to which to save the | |
| | selected content of the SQL Editor panel. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
Editing Options
***************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Save Data* | Click the *Save Data* icon to save data changes in the Data Output Panel to the server. | F6 |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Find* | Use the *Find* menu to search, replace, or navigate the code displayed in the SQL Editor: | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Find* to provide a search target, and search the SQL Editor contents. | Cmd+F |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Find next* to locate the next occurrence of the search target. | Cmd+G |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Find previous* to move to the last occurrence of the search target. | Cmd+Shift+G |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Pesistent find* to identify all occurrences of the search target within the editor. | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Replace* to locate and replace (with prompting) individual occurrences of the target. | Cmd+Shift+F |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Replace all* to locate and replace all occurrences of the target within the editor. | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Jump* to navigate to the next occurrence of the search target. | Alt+G |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Copy* | Click the *Copy* icon to copy the content that is currently highlighted in the Data Output panel. | Accesskey + C |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Paste* | Click the *Paste* icon to paste a previously row into a new row. | Accesskey + P |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Delete* | Click the *Delete* icon to delete the selected rows. | Accesskey + D |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Edit* | Use options on the *Edit* menu to access text editing tools; the options operate on the text | |
| | displayed in the SQL Editor panel when in Query Tool mode: | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Indent Selection* to indent the currently selected text. | Tab |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Unindent Selection* to remove indentation from the currently selected text. | Shift+Tab |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Inline Comment Selection* to enclose any lines that contain the selection in SQL style | Cmd+/ |
| | comment notation. | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Inline Uncomment Selection* to remove SQL style comment notation from the selected line. | Cmd+. |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Block Comment* to enclose all lines that contain the selection in C style comment | Shift+Cmd+/ |
| | notation. This option acts as a toggle. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
View/Edit Data Resultset Control
********************************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Filter* | Click the *Filter* icon to set filtering and sorting criteria for the data when in View/Edit data | Accesskey + F |
| | mode. Click the down arrow to access other filtering and sorting options: | |
| | | |
| | * Click *Sort/Filter* to open the sorting and filtering dialogue. | |
| | | |
| | * Click *Filter by Selection* to show only the rows containing the values in the selected cells. | |
| | | |
| | * Click *Exclude by Selection* to show only the rows that do not contain the values in the | |
| | selected cells. | |
| | | |
| | * Click *Remove Sort/Filter* to remove any previously selected sort or filtering options. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Limit Selector | Select a value in the *Limit Selector* to limit the size of the dataset to a number of rows. | Accesskey + R |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Stop* | Click the *Stop* icon to cancel the execution of the currently running query. | Accesskey + Q |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
Query Execution
***************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Execute/Refresh* | Click the *Execute/Refresh* icon to either execute or refresh the query highlighted in the SQL | F5 |
| | editor panel. Click the down arrow to access other execution options: | |
| | | |
| | * Add a check next to *Auto-Rollback* to instruct the server to automatically roll back a | |
| | transaction if an error occurs during the transaction. | |
| | | |
| | * Add a check next to *Auto-Commit* to instruct the server to automatically commit each | |
| | transaction. Any changes made by the transaction will be visible to others, and | |
| | durable in the event of a crash. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Explain* | Click the *Explain* icon to view an explanation plan for the current query. The result of the | F7 |
| | EXPLAIN is displayed graphically on the *Explain* tab of the output panel, and in text | |
| | form on the *Data Output* tab. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Explain analyze* | Click the *Explain analyze* icon to invoke an EXPLAIN ANALYZE command on the current query. | Shift+F7 |
| | | |
| | Navigate through the *Explain Options* menu to select options for the EXPLAIN command: | |
| | | |
| | * Select *Verbose* to display additional information regarding the query plan. | |
| | | |
| | * Select *Costs* to include information on the estimated startup and total cost of each | |
| | plan node, as well as the estimated number of rows and the estimated width of each | |
| | row. | |
| | | |
| | * Select *Buffers* to include information on buffer usage. | |
| | | |
| | * Select *Timing* to include information about the startup time and the amount of time | |
| | spent in each node of the query. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Commit* | Click the *Commit* icon to commit the transaction. | Shift+CTRL+M |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Rollback* | Click the *Rollback* icon to rollback the transaction. | Shift+CTRL+R |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Clear* | Use options on the *Clear* drop-down menu to erase display contents: | Accesskey + L |
| | | |
| | * Select *Clear Query Window* to erase the content of the SQL Editor panel. | |
| | | |
| | * Select *Clear History* to erase the content 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 specify the CSV settings through | |
| | *Preferences -> SQL Editor -> CSV output* dialogue. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
.. _query_tool_toolbar:
***************************
`Query Tool Toolbar`:index:
***************************
The *Query Tool* toolbar uses context-sensitive icons that provide shortcuts to
frequently performed tasks. If an icon is highlighted, the option is enabled;
if the icon is grayed-out, the task is disabled.
.. note:: 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.
.. image:: images/query_toolbar.png
:alt: Query tool toolbar
:align: center
Hover over an icon in pgAdmin to display a tooltip that describes the icon's
functionality.
File Options
************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Open File* | Click the *Open File* icon to display a previously saved query in the SQL Editor. | Accesskey + O |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Save File* | Click the *Save* icon to perform a quick-save of a previously saved query, or to access the | Accesskey + S |
| | *Save* menu: | |
| | | |
| | * Select *Save* to save the selected content of the SQL Editor panel in a file. | |
| | | |
| | * Select *Save As* to open a new browser dialog and specify a new location to which to save the | |
| | selected content of the SQL Editor panel. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
Editing Options
***************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Save Data Changes* | Click the *Save Data Changes* icon to save data changes (insert, update, or delete) in the Data | F6 |
| | Output Panel to the server. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Find* | Use the *Find* menu to search, replace, or navigate the code displayed in the SQL Editor: | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Find* to provide a search target, and search the SQL Editor contents. | Cmd+F |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Find next* to locate the next occurrence of the search target. | Cmd+G |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Find previous* to move to the last occurrence of the search target. | Cmd+Shift+G |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Persistent find* to identify all occurrences of the search target within the editor. | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Replace* to locate and replace (with prompting) individual occurrences of the target. | Cmd+Shift+F |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Replace all* to locate and replace all occurrences of the target within the editor. | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Jump* to navigate to the next occurrence of the search target. | Alt+G |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Copy* | Click the *Copy* icon to copy the content with or without header: | Accesskey + C |
| | | |
| | * Click the *Copy* icon to copy the content that is currently highlighted in the Data Output | |
| | panel. | |
| | | |
| | * Click *Copy with headers* to copy the highlighted content along with the header. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Paste* | Click the *Paste* icon to paste a previously copied row into a new row. | Accesskey + P |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Delete* | Click the *Delete* icon to mark the selected rows for deletion. These marked rows get deleted |Accesskey + D |
| | when you click the *Save Data Changes* icon. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Edit* | Use options on the *Edit* menu to access text editing tools; the options operate on the text | |
| | displayed in the SQL Editor panel when in Query Tool mode: | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Indent Selection* to indent the currently selected text. | Tab |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Unindent Selection* to remove indentation from the currently selected text. | Shift+Tab |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Inline Comment Selection* to enclose any lines that contain the selection in SQL style | Cmd+/ |
| | comment notation. | |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Inline Uncomment Selection* to remove SQL style comment notation from the selected line. | Cmd+. |
| +---------------------------------------------------------------------------------------------------+----------------+
| | Select *Block Comment* to enclose all lines that contain the selection in C style comment | Shift+Cmd+/ |
| | notation. This option acts as a toggle. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
View/Edit Data Resultset Control
********************************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Filter* | Click the *Filter* icon to set filtering and sorting criteria for the data when in View/Edit data | Accesskey + F |
| | mode. Click the down arrow to access other filtering and sorting options: | |
| | | |
| | * Click *Sort/Filter* to open the sorting and filtering dialogue. In the *SQL Filter*, you can | |
| | enter a SQL query as filtering criteria. In *Data Sorting*, you can select the column and | |
| | specify the order for sorting. | |
| | | |
| | * Click *Filter by Selection* to show only the rows containing the values in the selected cells. | |
| | | |
| | * Click *Exclude by Selection* to show only the rows that do not contain the values in the | |
| | selected cells. | |
| | | |
| | * Click *Remove Sort/Filter* to remove any previously selected sort or filtering options. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Limit Selector | Select a value in the *Limit Selector* to limit the size of the dataset to a number of rows. | Accesskey + R |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Stop* | Click the *Stop* icon to cancel the execution of the currently running query. | Accesskey + Q |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
Query Execution
***************
.. table::
:class: longtable
:widths: 1 4 1
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| Icon | Behavior | Shortcut |
+======================+===================================================================================================+================+
| *Execute/Refresh* | Click the *Execute/Refresh* icon to either execute or refresh the query highlighted in the SQL | F5 |
| | editor panel. Click the down arrow to access other execution options: | |
| | | |
| | * Add a check next to *Auto-Rollback* to instruct the server to automatically roll back a | |
| | transaction if an error occurs during the transaction. | |
| | | |
| | * Add a check next to *Auto-Commit* to instruct the server to automatically commit each | |
| | transaction. Any changes made by the transaction will be visible to others, and | |
| | durable in the event of a crash. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Explain* | Click the *Explain* icon to view an explanation plan for the current query. The result of the | F7 |
| | EXPLAIN is displayed graphically on the *Explain* tab of the output panel, and in text | |
| | form on the *Data Output* tab. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Explain analyze* | Click the *Explain analyze* icon to invoke an EXPLAIN ANALYZE command on the current query. | Shift+F7 |
| | | |
| | Navigate through the *Explain Options* menu to select options for the EXPLAIN command: | |
| | | |
| | * Select *Verbose* to display additional information regarding the query plan. | |
| | | |
| | * Select *Costs* to include information on the estimated startup and total cost of each | |
| | plan node, as well as the estimated number of rows and the estimated width of each | |
| | row. | |
| | | |
| | * Select *Buffers* to include information on buffer usage. | |
| | | |
| | * Select *Timing* to include information about the startup time and the amount of time | |
| | spent in each node of the query. | |
| | | |
| | * Select *Summary* to include the summary information about the query plan. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Commit* | Click the *Commit* icon to commit the transaction. | Shift+CTRL+M |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Rollback* | Click the *Rollback* icon to rollback the transaction. | Shift+CTRL+R |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
| *Clear* | Use options on the *Clear* drop-down menu to erase display contents: | Accesskey + L |
| | | |
| | * Select *Clear Query Window* to erase the content of the SQL Editor panel. | |
| | | |
| | * Select *Clear History* to erase the content 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 specify the CSV settings through | |
| | *Preferences -> SQL Editor -> CSV output* dialogue. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
+3
View File
@@ -11,6 +11,9 @@ notes for it.
.. toctree::
:maxdepth: 1
release_notes_4_15
release_notes_4_14
release_notes_4_13
release_notes_4_12
release_notes_4_11
release_notes_4_10
+65
View File
@@ -0,0 +1,65 @@
************
Version 4.13
************
Release date: 2019-09-19
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.12.
New features
************
| `Issue #2828 <https://redmine.postgresql.org/issues/2828>`_ - Added Gather Merge, Named Tuple Store Scan and Table Function Scan icon for explain module.
| `Issue #4553 <https://redmine.postgresql.org/issues/4553>`_ - Don't wait for the database connection before rendering the Query Tool UI, for improved UX.
| `Issue #4651 <https://redmine.postgresql.org/issues/4651>`_ - Allow configuration options to be set from the environment in the container distribution.
| `Issue #4667 <https://redmine.postgresql.org/issues/4667>`_ - Ensure editable and read-only columns in Query Tool should be identified by icons and tooltips in the column header.
| `Issue #4691 <https://redmine.postgresql.org/issues/4691>`_ - Add an Italian translation.
| `Issue #4752 <https://redmine.postgresql.org/issues/4752>`_ - Refactor Dockerfile to avoid needing to run supporting scripts (i.e. 'docker build .' will work) and minimise layers.
Housekeeping
************
| `Issue #4575 <https://redmine.postgresql.org/issues/4575>`_ - Add Reverse Engineered SQL tests for Schemas.
| `Issue #4576 <https://redmine.postgresql.org/issues/4576>`_ - Add Reverse Engineered SQL tests for Views.
| `Issue #4600 <https://redmine.postgresql.org/issues/4600>`_ - Add Reverse Engineered SQL tests for Rules.
| `Issue #4616 <https://redmine.postgresql.org/issues/4616>`_ - Add Reverse Engineered and Modified SQL tests for Foreign Keys.
| `Issue #4617 <https://redmine.postgresql.org/issues/4617>`_ - Add Reverse Engineered and Modified SQL tests for Foreign Servers.
| `Issue #4618 <https://redmine.postgresql.org/issues/4618>`_ - Add Reverse Engineered and Modified SQL tests for Foreign Tables.
| `Issue #4619 <https://redmine.postgresql.org/issues/4619>`_ - Add Reverse Engineered and Modified SQL tests for FTS Templates.
| `Issue #4621 <https://redmine.postgresql.org/issues/4621>`_ - Add Reverse Engineered and Modified SQL tests for Indexes.
| `Issue #4624 <https://redmine.postgresql.org/issues/4624>`_ - Add Reverse Engineered and Modified SQL tests for Primary Keys.
| `Issue #4627 <https://redmine.postgresql.org/issues/4627>`_ - Add Reverse Engineered and Modified SQL tests for User Mappings.
| `Issue #4690 <https://redmine.postgresql.org/issues/4690>`_ - Add Modified SQL tests for Resource Group.
Bug fixes
*********
| `Issue #2706 <https://redmine.postgresql.org/issues/2706>`_ - Added ProjectSet icon for explain module.
| `Issue #3778 <https://redmine.postgresql.org/issues/3778>`_ - Ensure Boolean columns should be editable using keyboard keys.
| `Issue #3936 <https://redmine.postgresql.org/issues/3936>`_ - Further code refactoring to stabilise the Feature Tests.
| `Issue #4381 <https://redmine.postgresql.org/issues/4381>`_ - Fix an issue where oid column should not be pasted when copy/paste row is used on query output containing the oid column.
| `Issue #4408 <https://redmine.postgresql.org/issues/4408>`_ - Fix display of validation error message in SlickGrid cells.
| `Issue #4412 <https://redmine.postgresql.org/issues/4412>`_ - Fix issue where Validated switch option is inverted for the Foreign Key.
| `Issue #4419 <https://redmine.postgresql.org/issues/4419>`_ - Fix a debugger error when using Python 2.7.
| `Issue #4461 <https://redmine.postgresql.org/issues/4461>`_ - Fix error while importing data to a table using Import/Export dialog and providing "Not null columns" option.
| `Issue #4486 <https://redmine.postgresql.org/issues/4486>`_ - Ensure View should be created with special characters.
| `Issue #4487 <https://redmine.postgresql.org/issues/4487>`_ - Ensure Boolean columns should be editable in View/Edit data and Query Tool.
| `Issue #4577 <https://redmine.postgresql.org/issues/4577>`_ - Fix an error that could be seen when click on any system column of a table.
| `Issue #4584 <https://redmine.postgresql.org/issues/4584>`_ - Unescape HTML entities in database names in the Query Tool title bar.
| `Issue #4631 <https://redmine.postgresql.org/issues/4631>`_ - Add editor options for plain text mode and to disable block folding to workaround rendering speed issues in CodeMirror with very large scripts.
| `Issue #4642 <https://redmine.postgresql.org/issues/4642>`_ - Ensure port and username should not be mandatory when a service is provided.
| `Issue #4643 <https://redmine.postgresql.org/issues/4643>`_ - Fix Truncate option deselect issue for compound triggers.
| `Issue #4644 <https://redmine.postgresql.org/issues/4644>`_ - Fix length and precision enable/disable issue when changing the data type for Domain node.
| `Issue #4650 <https://redmine.postgresql.org/issues/4650>`_ - Fix SQL tab issue for Views. It's a regression of compound triggers.
| `Issue #4657 <https://redmine.postgresql.org/issues/4657>`_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container.
| `Issue #4663 <https://redmine.postgresql.org/issues/4663>`_ - Fix exception in query history for python 2.7.
| `Issue #4674 <https://redmine.postgresql.org/issues/4674>`_ - Fix query tool launch error if user name contain html characters.
| `Issue #4681 <https://redmine.postgresql.org/issues/4681>`_ - Increase cache control max age for static files to improve performance over longer run.
| `Issue #4698 <https://redmine.postgresql.org/issues/4698>`_ - Fix SQL issue of length and precision when changing the data type of Column.
| `Issue #4702 <https://redmine.postgresql.org/issues/4702>`_ - Fix modified SQL for Index when reset the value of Fill factor and Clustered?.
| `Issue #4703 <https://redmine.postgresql.org/issues/4703>`_ - Fix reversed engineered SQL for btree Index when provided sort order and NULLs.
| `Issue #4726 <https://redmine.postgresql.org/issues/4726>`_ - Ensure sequence with negative value should be created.
| `Issue #4727 <https://redmine.postgresql.org/issues/4727>`_ - Fix issue where EXEC script doesn't write the complete script for Procedures.
| `Issue #4736 <https://redmine.postgresql.org/issues/4736>`_ - Fix query tool and view data issue with the Italian language.
| `Issue #4742 <https://redmine.postgresql.org/issues/4742>`_ - Ensure Primary Key should be created with Index.
| `Issue #4750 <https://redmine.postgresql.org/issues/4750>`_ - Fix query history exception for Python 3.6.
+40
View File
@@ -0,0 +1,40 @@
************
Version 4.14
************
Release date: 2019-10-17
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.13.
New features
************
| `Issue #3009 <https://redmine.postgresql.org/issues/3009>`_ - Added Copy with headers functionality when copy data from Query Tool/View Data.
| `Issue #4778 <https://redmine.postgresql.org/issues/4778>`_ - Implemeted the Query Plan Analyser.
| `Issue #4823 <https://redmine.postgresql.org/issues/4823>`_ - Include PostgreSQL 12 binaries in the container.
Housekeeping
************
| `Issue #4472 <https://redmine.postgresql.org/issues/4472>`_ - Add Reverse Engineered and Modified SQL tests for Synonyms.
| `Issue #4628 <https://redmine.postgresql.org/issues/4628>`_ - Add Reverse Engineered and Modified SQL tests for Unique Constraints.
| `Issue #4701 <https://redmine.postgresql.org/issues/4701>`_ - Optimize Webpack to improve overall performance.
Bug fixes
*********
| `Issue #3386 <https://redmine.postgresql.org/issues/3386>`_ - Ensure backup a partition table should not backup the whole database.
| `Issue #4199 <https://redmine.postgresql.org/issues/4199>`_ - Ensure that 'ENTER' key in the data filter should not run the query.
| `Issue #4590 <https://redmine.postgresql.org/issues/4590>`_ - Fix issue where backup fails for schema name that needs quoting.
| `Issue #4728 <https://redmine.postgresql.org/issues/4728>`_ - Highlighted the color of closing or opening parenthesis when user select them in CodeMirror.
| `Issue #4751 <https://redmine.postgresql.org/issues/4751>`_ - Fix issue where export job fails when deselecting all the columns.
| `Issue #4753 <https://redmine.postgresql.org/issues/4753>`_ - Fix an error where 'false' string is displayed when we add a new parameter in the Parameters tab, also clear the old value when the user changes the parameter name.
| `Issue #4755 <https://redmine.postgresql.org/issues/4755>`_ - Ensure that pgAdmin should work behind reverse proxy if the inbuilt server is used as it is.
| `Issue #4756 <https://redmine.postgresql.org/issues/4756>`_ - Fix issue where pgAdmin does not load completely if loaded in an iframe.
| `Issue #4760 <https://redmine.postgresql.org/issues/4760>`_ - Ensure the search path should not be quoted for Database.
| `Issue #4768 <https://redmine.postgresql.org/issues/4768>`_ - Ensure pgAdmin should work behind reverse proxy on a non standard port.
| `Issue #4769 <https://redmine.postgresql.org/issues/4769>`_ - Fix query tool open issue on Internet Explorer.
| `Issue #4777 <https://redmine.postgresql.org/issues/4777>`_ - Fix issue where query history is not visible in the query history tab.
| `Issue #4780 <https://redmine.postgresql.org/issues/4780>`_ - Ensure the search path should not be quoted for Function, Procedure and Trigger Function.
| `Issue #4791 <https://redmine.postgresql.org/issues/4791>`_ - Fix issue where VALID foreign keys show as NOT VALID in the SQL tab for tables.
| `Issue #4817 <https://redmine.postgresql.org/issues/4817>`_ - Ensure the MAC OSX app should be notarized for Catalina.
+52
View File
@@ -0,0 +1,52 @@
************
Version 4.15
************
Release date: 2019-11-14
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.14.
New features
************
| `Issue #1974 <https://redmine.postgresql.org/issues/1974>`_ - Added encrypted password in reverse engineered SQL for roles.
| `Issue #3741 <https://redmine.postgresql.org/issues/3741>`_ - Added Dark(Beta) UI Theme option.
| `Issue #4006 <https://redmine.postgresql.org/issues/4006>`_ - Support Enable Always and Enable Replica on triggers.
| `Issue #4351 <https://redmine.postgresql.org/issues/4351>`_ - Add an option to request confirmation before cancelling/resetting changes on a Properties dialog.
| `Issue #4348 <https://redmine.postgresql.org/issues/4348>`_ - Added support for custom theme creation and selection.
Housekeeping
************
Bug fixes
*********
| `Issue #3130 <https://redmine.postgresql.org/issues/3130>`_ - Ensure create new object dialog should be opened when alt+shift+n key is pressed on the collection node.
| `Issue #3279 <https://redmine.postgresql.org/issues/3279>`_ - Fixed issue where Drop and Disconnect connection menu points are too close to each other.
| `Issue #3789 <https://redmine.postgresql.org/issues/3789>`_ - Ensure context menus never get hidden below the menu bar.
| `Issue #3859 <https://redmine.postgresql.org/issues/3859>`_ - Rename the context menu from 'Drop Server' to 'Remove Server'.
| `Issue #3913 <https://redmine.postgresql.org/issues/3913>`_ - Ensure the correct "running at" agent is shown when a pgAgent job is executing.
| `Issue #3915 <https://redmine.postgresql.org/issues/3915>`_ - Fix an issue in the Query Tool where shortcut keys could be ignored following a query error.
| `Issue #3999 <https://redmine.postgresql.org/issues/3999>`_ - Fix the toggle case shortcut key combination.
| `Issue #4173 <https://redmine.postgresql.org/issues/4173>`_ - Fix an issue where a black arrow-kind image is displaying at the background of browser tree images.
| `Issue #4191 <https://redmine.postgresql.org/issues/4191>`_ - Ensure comments are shown in reverse engineered SQL for table partitions.
| `Issue #4242 <https://redmine.postgresql.org/issues/4242>`_ - Handle NULL values appropriately when sorting backgrid tables.
| `Issue #4341 <https://redmine.postgresql.org/issues/4341>`_ - Give appropriate error messages when the user tries to use an blank master password.
| `Issue #4451 <https://redmine.postgresql.org/issues/4451>`_ - Remove arbitrary (and incorrect) requirement that composite types must have at least two members.
| `Issue #4459 <https://redmine.postgresql.org/issues/4459>`_ - Don't quote bigints when copying them from the Query Tool results grid.
| `Issue #4482 <https://redmine.postgresql.org/issues/4482>`_ - Ensure compression level is passed to pg_dump when backing up in directory format.
| `Issue #4483 <https://redmine.postgresql.org/issues/4483>`_ - Ensure the number of jobs can be specified when backing up in directory format.
| `Issue #4564 <https://redmine.postgresql.org/issues/4564>`_ - Ensure Javascript errors during Query Tool execution are reported as such and not as Ajax errors.
| `Issue #4610 <https://redmine.postgresql.org/issues/4610>`_ - Suppress Enter key presses in Alertify dialogues when the come from Select2 controls to allow item selection with Enter.
| `Issue #4647 <https://redmine.postgresql.org/issues/4647>`_ - Ensure that units are respected when sorting by file size in the File dialog.
| `Issue #4730 <https://redmine.postgresql.org/issues/4730>`_ - Ensure all messages are retained in the Query Tool from long running queries.
| `Issue #4734 <https://redmine.postgresql.org/issues/4734>`_ - Updated documentation for the delete row button that only strikeout the row instead of deleting it.
| `Issue #4779 <https://redmine.postgresql.org/issues/4779>`_ - Updated documentation for the query tool toolbar buttons.
| `Issue #4835 <https://redmine.postgresql.org/issues/4835>`_ - Fixed an issue where psql of v12 throwing "symbol not found" error while running Maintenance and Import/Export.
| `Issue #4845 <https://redmine.postgresql.org/issues/4845>`_ - Fixed potential error in the properties dialog for the Code tab.
| `Issue #4850 <https://redmine.postgresql.org/issues/4850>`_ - Fixed an issue where Datetimepicker control opens when clicking on the label.
| `Issue #4895 <https://redmine.postgresql.org/issues/4895>`_ - Fixed potential issue in reset function for nested objects.
| `Issue #4896 <https://redmine.postgresql.org/issues/4896>`_ - Fixed an issue where escape key not working to close the open/save file dialog.
| `Issue #4906 <https://redmine.postgresql.org/issues/4906>`_ - Fixed an issue where keyboard shortcut for context menu is not working when using Firefox on CentOS7.
| `Issue #4924 <https://redmine.postgresql.org/issues/4924>`_ - Fixed docker container exit issue occurs due to change in Gunicorn's latest version.
+7 -18
View File
@@ -59,24 +59,7 @@ In order to configure pgAdmin to run in server mode, it may be necessary to
configure the Python code to run in multi-user mode, and then to configure the
web server to find and execute the code.
Note that 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 administrators in the same directory as ``config.py`` if
needed.
See :ref:`config_py` for more information on configuration settings.
Python
------
@@ -117,6 +100,12 @@ In order to configure the Python code, follow these steps:
# chown www-data:www-data /var/lib/pgadmin4/pgadmin4.db
Hosting
*******
There are many possible ways to host pgAdmin in server mode. Some examples are
given below:
Apache HTTPD Configuration (Windows)
------------------------------------
+23
View File
@@ -2,3 +2,26 @@
{% set favicon = 'favicon.ico' %}
{% endif %}
{%- extends "classic/layout.html" %}
{%- block footer %}
<div class="footer" role="contentinfo">
<div class="related" role="navigation" aria-label="related navigation">
<ul>
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}<li class="left" style="margin-left: 10px">&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.</li>{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}<li class="left" style="margin-left: 10px">&#169; Copyright {{ copyright }}.</li>{% endtrans %}
{%- endif %}
{%- endif %}
<li class="right" style="margin-right: 10px"><a href="genindex.html" title="General Index" accesskey="I">index</a></li>
{%- if next %}
<li class="right" ><a href="{{ next.link|e }}" title="{{ next.title|striptags|e }}" accesskey="N">next</a> |</li>
{%- endif %}
{%- if prev %}
<li class="right" ><a href="{{ prev.link|e }}" title="{{ prev.title|striptags|e }}" accesskey="P">previous</a> |</li>
{%- endif %}
</ul>
</div>
</div>
{%- endblock %}
+21 -11
View File
@@ -14,7 +14,7 @@ body {
div.body {
font-family: Roboto, Helvetica Neue, -apple-system, BlinkMacSystemFont, Segoe UI, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
font-size: 1rem;
font-size: 1.1rem;
max-width: 100%;
color: #222222;
-webkit-font-smoothing: antialiased;
@@ -47,15 +47,15 @@ a:hover {
}
div.body dd, div.body blockquote {
line-height: 1.8em;
line-height: 1.4em;
}
div.body p{
line-height: 1.8em;
line-height: 1.4em;
}
div.body ul li{
line-height: 1.8em;
line-height: 1.4em;
}
div.body p strong{
@@ -66,10 +66,6 @@ div.body li em, div.body p em{
font-weight: 400;
}
div.toctree-wrapper ul li.toctree-l1{
list-style: none;
}
div.toctree-wrapper ul li.toctree-l1 a cite{
font-weight: 500;
font-style: normal;
@@ -142,10 +138,23 @@ div.related[role=navigation] ~ div.related[role=navigation] {
display: none;
}
div.related a {
color: #fff;
}
div.footer div.related ul {
line-height: 0.85em;
}
div.footer div.related a {
text-decoration: none;
}
div.footer div.related a:hover {
text-decoration: underline;
}
div.document{
background-color: #ebeef3;
}
@@ -155,6 +164,7 @@ div.footer {
padding: 5px 0;
background-color: #295C85;
top: calc(100% - 24px);
font-size: 1em;
}
.line-block {
@@ -262,7 +272,7 @@ div.sphinxsidebar form div:first-child{
}
div.sphinxsidebar {
line-height: 1.4rem;
line-height: 1.2rem;
font-size: 0.85rem;
color: #858da0;
background-color: #ebeef3;
@@ -383,14 +393,14 @@ div.sphinxsidebarwrapper {
div.sphinxsidebarwrapper ul li.toctree-l1 ul li.toctree-l2 a:before{
content: "●";
padding-right: 5px;
font-size: 0.60rem;
font-size: 0.85rem;
vertical-align: baseline;
}
div.sphinxsidebarwrapper ul li.toctree-l1 a:before{
content: "●";
padding-right: 5px;
font-size: 0.6rem;
font-size: 0.85rem;
}
div.body form input[type="text"]{
+1 -1
View File
@@ -17,5 +17,5 @@ the selected browser node.
current database context.
* Use the :ref:`View Data <editgrid>` button to view/edit the data stored in a
selected table.
* Use the :ref:`Filtered Rows <editgrid>` button to access the Data Filter popup
* Use the :ref:`Filtered Rows <viewdata_filter>` button to access the Data Filter popup
to apply a filter to a set of data for viewing/editing.
+8 -1
View File
@@ -48,6 +48,13 @@ Use the fields in the *Definition* tab to define the trigger:
arguments to the function when the trigger is executed. The arguments are
literal string constants.
.. image:: images/trigger_definition_enabled.png
:alt: Trigger enabled in dialog tab
:align: center
* *Trigger enabled* field is available in trigger dialog once the trigger is created.
You can select one of the four options available.
Click the *Events* tab to continue.
.. image:: images/trigger_events.png
@@ -96,4 +103,4 @@ The example demonstrates creating a trigger named *log_update*.
* 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.
* Click the *Reset* button to restore configuration parameters.
+19
View File
@@ -0,0 +1,19 @@
.. _viewdata_filter:
******************************
`View/Edit Data Filter`:index:
******************************
You can access *Data Filter dialog* by clicking on *Filtered Rows* toolbar button
visible on the Browser panel or by selecting *View/Edit Data -> Filtered Rows*
context menu option.
This allows you to specify an SQL Filter to limit the data displayed
in the edit grid window:
.. image:: images/viewdata_filter_dialog.png
:alt: View Data filter dialog window
:align: center
.. note:: Use SHIFT + ENTER keys to apply filter.
+219 -181
View File
File diff suppressed because it is too large. Load diff
-2
View File
@@ -1,2 +0,0 @@
pgadmin4/web/**/tests/
pgadmin4/web/regression/
-99
View File
@@ -1,99 +0,0 @@
########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
#########################################################################
# First of all, build frontend with NodeJS in a separate builder container
# Node-8 is supported by all needed C++ packages
FROM node:8 AS node-builder
COPY ./pgadmin4/web/ /pgadmin4/web/
WORKDIR /pgadmin4/web
RUN yarn install --cache-folder ./ycache --verbose && \
yarn run bundle && \
rm -rf ./ycache ./pgadmin/static/js/generated/.cache
# Build Sphinx documentation in separate container
FROM python:3.7-alpine3.9 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 ./pgadmin4/ /pgadmin4
# 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
# Get the PG binaries
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
# Then install backend, copy static files and set up entrypoint
FROM python:3.7-alpine3.9
# Copy the PG binaries
COPY --from=pg94-builder /usr/local/bin/pg_dump /usr/local/pgsql-9.4/
COPY --from=pg94-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-9.4/
COPY --from=pg94-builder /usr/local/bin/pg_restore /usr/local/pgsql-9.4/
COPY --from=pg94-builder /usr/local/bin/psql /usr/local/pgsql-9.4/
COPY --from=pg95-builder /usr/local/bin/pg_dump /usr/local/pgsql-9.5/
COPY --from=pg95-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-9.5/
COPY --from=pg95-builder /usr/local/bin/pg_restore /usr/local/pgsql-9.5/
COPY --from=pg95-builder /usr/local/bin/psql /usr/local/pgsql-9.5/
COPY --from=pg96-builder /usr/local/bin/pg_dump /usr/local/pgsql-9.6/
COPY --from=pg96-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-9.6/
COPY --from=pg96-builder /usr/local/bin/pg_restore /usr/local/pgsql-9.6/
COPY --from=pg96-builder /usr/local/bin/psql /usr/local/pgsql-9.6/
COPY --from=pg10-builder /usr/local/bin/pg_dump /usr/local/pgsql-10/
COPY --from=pg10-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-10/
COPY --from=pg10-builder /usr/local/bin/pg_restore /usr/local/pgsql-10/
COPY --from=pg10-builder /usr/local/bin/psql /usr/local/pgsql-10/
COPY --from=pg11-builder /usr/local/bin/pg_dump /usr/local/pgsql-11/
COPY --from=pg11-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-11/
COPY --from=pg11-builder /usr/local/bin/pg_restore /usr/local/pgsql-11/
COPY --from=pg11-builder /usr/local/bin/psql /usr/local/pgsql-11/
WORKDIR /pgadmin4
ENV PYTHONPATH=/pgadmin4
#Copy in the docs and JS/CSS bundles
COPY --from=node-builder /pgadmin4/web/pgadmin/static/js/generated/ /pgadmin4/pgadmin/static/js/generated/
COPY --from=docs-builder /pgadmin4/docs/en_US/_build/html/ /pgadmin4/docs/
# Install build-dependencies, build & install C extensions and purge deps in one RUN step
# so that deps do not increase the size of resulting image by remaining in layers
COPY ./pgadmin4/requirements.txt /pgadmin4
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 code
COPY ./pgadmin4/web /pgadmin4
COPY ./run_pgadmin.py /pgadmin4
COPY ./config_distro.py /pgadmin4
COPY ./entrypoint.sh /entrypoint.sh
# Precompile and optimize python code to save time and space on startup
RUN python -O -m compileall /pgadmin4
# Finish up
VOLUME /var/lib/pgadmin
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
+13 -118
View File
@@ -1,129 +1,24 @@
This directory contains the files required to create a docker container running pgAdmin.
This directory contains the files required to create a docker container running
pgAdmin.
Building
========
Whilst you can just use the Dockerfile directly, it requires that various pre-configuration steps are performed, for
example, the pgAdmin web code must be copied to `./web`, Sphinx documentation source must be copied to `./docs`
and `requirements.txt` is also expected to be in this directory.
From the top level directory of the pgAdmin source tree, simply run:
The recommended (and easy) way to build the container is to do:
docker build .
```console
cd $PGADMIN_SRC/
workon pgadmin-venv
make docker
```
You can also run 'make docker', which will call 'docker build .' but also tag
the image like:
This will call the build script $PGADMIN_SRC/pkg/docker/build.sh which will prepare a staging directory containing all
the required files, then build the container and push it to your repo.
pgadmin4 pgadmin4:latest pgadmin4:4 pgadmin4:4.12
WARNING: The build should be run in a CLEAN source tree. Whilst some potentially
dangerous files such as config_local.py or log files will be explicitly
excluded from the final image, other files will not be.
Running
=======
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_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.
*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.
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.
*/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.
*/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:
```
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 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:
```
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
```
See the documentation at docs/en_US/container_deployment.rst for information on
running the container.
-62
View File
@@ -1,62 +0,0 @@
#!/bin/bash
########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2019, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
#########################################################################
# Runtime checks
if [ ! -d runtime -a ! -d web ]; then
echo This script must be run from the top-level directory of the source tree.
exit 1
fi
if [ ! -d .git -a ! -f .git/config ]; then
echo This script must be run from a git checkout of the source tree.
exit 1
fi
# Get the required package info
APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
if [ ! -z ${APP_SUFFIX} ]; then
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
fi
CONTAINER_NAME=`echo ${APP_NAME} | sed 's/ //g' | awk '{print tolower($0)}'`
# Output basic details to show we're working
echo Building Docker Container for ${APP_NAME} version ${APP_LONG_VERSION}...
# Create/clearout the build directory
echo Creating/cleaning required directories...
if [ -d docker-build ]; then
rm -rf docker-build
fi
mkdir -p docker-build/pgadmin4
# Build the clean tree
echo Copying source tree...
git archive HEAD -- docs web requirements.txt | tar xvf - -C docker-build/pgadmin4
# Copy the Docker specific assets into place
cp pkg/docker/Dockerfile \
pkg/docker/entrypoint.sh \
pkg/docker/config_distro.py \
pkg/docker/run_pgadmin.py \
pkg/docker/.dockerignore \
docker-build/
# Build the container
docker build docker-build -t ${CONTAINER_NAME} \
-t ${CONTAINER_NAME}:latest \
-t ${CONTAINER_NAME}:${APP_RELEASE} \
-t ${CONTAINER_NAME}:${APP_LONG_VERSION}
-4
View File
@@ -1,4 +0,0 @@
HELP_PATH = '../../docs'
DEFAULT_BINARY_PATHS = {
'pg': '/usr/local/pgsql-11'
}
+19 -1
View File
@@ -1,5 +1,23 @@
#!/bin/sh
# Create config_distro.py. This has some default config, as well as anything
# provided by the user through the PGADMIN_CONFIG_* environment variables.
# Only write the file on first launch.
if [ ! -f /pgadmin4/config_distro.py ]; then
cat << EOF > /pgadmin4/config_distro.py
HELP_PATH = '../../docs'
DEFAULT_BINARY_PATHS = {
'pg': '/usr/local/pgsql-12'
}
EOF
# This is a bit kludgy, but necessary as the container uses BusyBox/ash as
# it's shell and not bash which would allow a much cleaner implementation
for var in $(env | grep PGADMIN_CONFIG_ | cut -d "=" -f 1); do
echo ${var#PGADMIN_CONFIG_} = $(eval "echo \$$var") >> /pgadmin4/config_distro.py
done
fi
if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
if [ -z "${PGADMIN_DEFAULT_EMAIL}" -o -z "${PGADMIN_DEFAULT_PASSWORD}" ]; then
echo 'You need to specify PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD environment variables'
@@ -15,7 +33,7 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
# Importing pgadmin4 (from this script) is enough
python run_pgadmin.py
export PGADMIN_SERVER_JSON_FILE=${PGADMIN_SERVER_JSON:-/pgadmin4/servers.json}
export PGADMIN_SERVER_JSON_FILE=${PGADMIN_SERVER_JSON_FILE:-/pgadmin4/servers.json}
# Pre-load any required servers
if [ -f "${PGADMIN_SERVER_JSON_FILE}" ]; then
/usr/local/bin/python /pgadmin4/setup.py --load-servers "${PGADMIN_SERVER_JSON_FILE}" --user ${PGADMIN_DEFAULT_EMAIL}
+2 -4
View File
@@ -16,6 +16,7 @@
##############################################################################
blinker==1.4
Flask==1.0.2
Werkzeug>=0.15.0
Flask-Gravatar==0.5.0
Flask-Login==0.4.1
Flask-Mail==0.9.1
@@ -23,6 +24,7 @@ Flask-Migrate==2.4.0
Flask-Principal==0.4.0
Flask-SQLAlchemy==2.3.2
Flask-WTF==0.14.2
Flask-Compress==1.4.0
passlib==1.7.1
pytz==2018.9
simplejson==3.16.0
@@ -34,10 +36,6 @@ Flask-Paranoid==0.2.0
psutil==5.5.1
psycopg2>=2.8
python-dateutil>=2.8.0
htmlmin==0.1.12
Flask-HTMLmin==1.5.0
SQLAlchemy>=1.2.18
Flask-Security>=3.0.0
sshtunnel>=0.1.4
+2 -2
View File
@@ -8,9 +8,9 @@
<key>CFBundleName</key>
<string>pgAdmin 4</string>
<key>CFBundleShortVersionString</key>
<string>4.12.0</string>
<string>4.15.0</string>
<key>CFBundleVersion</key>
<string>4.12.0</string>
<string>4.15.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>NSHumanReadableCopyright</key>
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION = 4.12.0.0
VERSION = 4.15.0.0
QMAKE_TARGET_COMPANY = "The pgAdmin Development Team"
QMAKE_TARGET_PRODUCT = "pgAdmin 4"
QMAKE_TARGET_DESCRIPTION = "pgAdmin 4 Desktop Runtime"
+36 -6
View File
@@ -14,6 +14,7 @@
import logging
import os
import sys
import json
if sys.version_info[0] >= 3:
import builtins
@@ -50,7 +51,7 @@ APP_ICON = 'pg-icon'
# Application version number components
APP_RELEASE = 4
APP_REVISION = 12
APP_REVISION = 15
# Application version suffix, e.g. 'beta1', 'dev'. Usually an empty string
# for GA releases.
@@ -59,7 +60,7 @@ APP_SUFFIX = ''
# Numeric application version for upgrade checks. Should be in the format:
# [X]XYYZZ, where X is the release version, Y is the revision, with a leading
# zero if needed, and Z represents the suffix, with a leading zero if needed
APP_VERSION_INT = 41200
APP_VERSION_INT = 41500
# DO NOT CHANGE!
# The application version string, constructed from the components
@@ -85,6 +86,7 @@ LANGUAGES = {
'zh': 'Chinese (Simplified)',
'fr': 'French',
'de': 'German',
'it': 'Italian',
'ja': 'Japanese',
'ko': 'Korean',
'pl': 'Polish',
@@ -154,14 +156,41 @@ X_FRAME_OPTIONS = "SAMEORIGIN"
# Hashing algorithm used for password storage
SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'
# Reverse Proxy parameters
# You must tell the middleware how many proxies set each header
# so it knows what values to trust.
# See https://tinyurl.com/yyg7r9av
# for more information.
# Number of values to trust for X-Forwarded-For
PROXY_X_FOR_COUNT = 1
# Number of values to trust for X-Forwarded-Proto.
PROXY_X_PROTO_COUNT = 1
# Number of values to trust for X-Forwarded-Host.
PROXY_X_HOST_COUNT = 0
# Number of values to trust for X-Forwarded-Port.
PROXY_X_PORT_COUNT = 1
# Number of values to trust for X-Forwarded-Prefix.
PROXY_X_PREFIX_COUNT = 0
# NOTE: CSRF_SESSION_KEY, SECRET_KEY and SECURITY_PASSWORD_SALT are no
# longer part of the main configuration, but are stored in the
# configuration databases 'keys' table and are auto-generated.
# Should HTML be minified on the fly when not in debug mode?
# NOTE: The HTMLMIN module doesn't work with Python 2.6, so this option
# has no effect on <= Python 2.7.
MINIFY_PAGE = True
# COMPRESSION
COMPRESS_MIMETYPES = [
'text/html', 'text/css', 'text/xml', 'application/json',
'application/javascript'
]
COMPRESS_LEVEL = 9
COMPRESS_MIN_SIZE = 500
# Set the cache control max age for static files in flask to 1 year
SEND_FILE_MAX_AGE_DEFAULT = 31556952
# This will be added to static urls as url parameter with value as
# APP_VERSION_INT for cache busting on version upgrade. If the value is set as
@@ -458,6 +487,7 @@ try:
except ImportError:
pass
# SUPPORT_SSH_TUNNEL can be override in local config file and if that
# setting is False in local config then we should not check the Python version.
if (SUPPORT_SSH_TUNNEL is True and
+91
View File
@@ -0,0 +1,91 @@
"""Change the not null constraints for port, username as it should not
compulsory when service is provided. RM #4642
Revision ID: a77a0932a568
Revises: 35f29b1701bd
Create Date: 2019-09-09 15:41:30.084753
"""
from alembic import op
import sqlalchemy as sa
from pgadmin.model import db
# revision identifiers, used by Alembic.
revision = 'a77a0932a568'
down_revision = '35f29b1701bd'
branch_labels = None
depends_on = None
def upgrade():
# To Save previous data
db.engine.execute("ALTER TABLE server RENAME TO server_old")
# Create table with drop constraint for port and username definition
db.engine.execute("""
CREATE TABLE server (
id INTEGER NOT NULL,
user_id INTEGER NOT NULL,
servergroup_id INTEGER NOT NULL,
name VARCHAR(128) NOT NULL,
host VARCHAR(128),
port INTEGER,
maintenance_db VARCHAR(64) NOT NULL,
username VARCHAR(64),
password VARCHAR(64),
role VARCHAR(64),
ssl_mode VARCHAR(16) NOT NULL CHECK(ssl_mode IN
( 'allow' , 'prefer' , 'require' , 'disable' ,
'verify-ca' , 'verify-full' )
),
comment VARCHAR(1024),
discovery_id VARCHAR(128),
hostaddr TEXT(1024),
db_res TEXT,
passfile TEXT,
sslcert TEXT,
sslkey TEXT,
sslrootcert TEXT,
sslcrl TEXT,
sslcompression INTEGER DEFAULT 0,
bgcolor TEXT(10),
fgcolor TEXT(10),
service TEXT,
use_ssh_tunnel INTEGER DEFAULT 0,
tunnel_host TEXT,
tunnel_port TEXT,
tunnel_username TEXT,
tunnel_authentication INTEGER DEFAULT 0,
tunnel_identity_file TEXT, connect_timeout INTEGER DEFAULT 0, tunnel_password TEXT(64),
PRIMARY KEY(id),
FOREIGN KEY(user_id) REFERENCES user(id),
FOREIGN KEY(servergroup_id) REFERENCES servergroup(id)
)
""")
# Copy old data again into table
db.engine.execute("""
INSERT INTO server (
id, user_id, servergroup_id, name, host, port, maintenance_db,
username, password, role, ssl_mode, comment, discovery_id, hostaddr,
db_res, passfile, sslcert, sslkey, sslrootcert, sslcrl,
sslcompression, bgcolor, fgcolor, service, use_ssh_tunnel,
tunnel_host, tunnel_port, tunnel_username, tunnel_authentication,
tunnel_identity_file
) SELECT
id, user_id, servergroup_id, name, host, port, maintenance_db,
username, password, role, ssl_mode, comment, discovery_id, hostaddr,
db_res, passfile, sslcert, sslkey, sslrootcert, sslcrl,
sslcompression, bgcolor, fgcolor, service, use_ssh_tunnel,
tunnel_host, tunnel_port, tunnel_username, tunnel_authentication,
tunnel_identity_file
FROM server_old""")
# Remove old data
db.engine.execute("DROP TABLE server_old")
def downgrade():
pass
+11 -8
View File
@@ -7,15 +7,19 @@
],
"license": "PostgreSQL",
"devDependencies": {
"@babel/core": "~7.3.4",
"@babel/preset-env": "~7.3.4",
"axios-mock-adapter": "^1.16.0",
"@babel/core": "~7.6.0",
"@babel/preset-env": "~7.6.0",
"autoprefixer": "^9.6.4",
"axios-mock-adapter": "^1.17.0",
"babel-loader": "~8.0.5",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"copy-webpack-plugin": "^5.0.4",
"core-js": "^3.2.1",
"cross-env": "^5.2.0",
"eclint": "^2.8.1",
"eslint": "5.15.1",
"file-loader": "^3.0.1",
"iconfont-webpack-plugin": "^4.2.1",
"image-webpack-loader": "^4.6.0",
"is-docker": "^1.1.0",
"jasmine-core": "~3.3.0",
@@ -33,6 +37,7 @@
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"popper.js": "^1.14.7",
"postcss-loader": "^3.0.0",
"raw-loader": "^1.0.0",
"sass-loader": "^7.1.0",
"sass-resources-loader": "^2.0.0",
@@ -40,11 +45,12 @@
"uglifyjs-webpack-plugin": "^2.1.2",
"url-loader": "^1.1.2",
"webpack": "^4.29.6",
"webpack-bundle-analyzer": "^3.5.1",
"webpack-cli": "^3.2.3",
"webpack-require-from": "^1.8.0",
"yarn-audit-html": "^1.1.0"
},
"dependencies": {
"@babel/polyfill": "^7.2.5",
"acitree": "git+https://github.com/imsurinder90/jquery-aciTree.git#rc.7",
"alertifyjs": "1.7.1",
"axios": "^0.18.1",
@@ -53,10 +59,8 @@
"babelify": "~10.0.0",
"backbone": "1.4.0",
"backform": "^0.2.0",
"backgrid": "^0.3.8",
"backgrid-filter": "^0.3.7",
"backgrid-select-all": "^0.3.5",
"backgrid-sizeable-columns": "^0.1.1",
"bignumber.js": "^8.1.1",
"bootstrap": "^4.3.1",
"bootstrap-datepicker": "^1.8.0",
@@ -88,12 +92,10 @@
"snapsvg": "^0.5.1",
"spectrum-colorpicker": "^1.8.0",
"split.js": "^1.5.10",
"sprintf-js": "^1.1.2",
"tablesorter": "^2.31.1",
"tempusdominus-bootstrap-4": "^5.1.2",
"tempusdominus-core": "^5.0.3",
"underscore": "^1.9.1",
"underscore.string": "^3.3.5",
"watchify": "~3.11.1",
"webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#c95d295382ac61159e571af9c3b8f4f8ae81746d",
"wkx": "^0.4.6"
@@ -104,6 +106,7 @@
"webpacker:watch": "yarn run webpack --config webpack.config.js --progress --watch",
"bundle:watch": "yarn run linter && yarn run webpacker:watch",
"bundle:dev": "yarn run linter && yarn run webpacker",
"bundle:analyze": "cross-env NODE_ENV=production ANALYZE=true yarn run bundle:dev",
"bundle": "cross-env NODE_ENV=production yarn run bundle:dev",
"test:karma-once": "yarn run linter && yarn run karma start --single-run",
"test:karma": "yarn run linter && yarn run karma start",
+15 -2
View File
@@ -69,7 +69,18 @@ if not os.path.isfile(config.SQLITE_PATH):
##########################################################################
class ReverseProxied(object):
def __init__(self, app):
self.app = app
# https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy_fix
try:
from werkzeug.middleware.proxy_fix import ProxyFix
self.app = ProxyFix(app,
x_for=config.PROXY_X_FOR_COUNT,
x_proto=config.PROXY_X_PROTO_COUNT,
x_host=config.PROXY_X_HOST_COUNT,
x_port=config.PROXY_X_PORT_COUNT,
x_prefix=config.PROXY_X_PREFIX_COUNT
)
except ImportError:
pass
def __call__(self, environ, start_response):
script_name = environ.get("HTTP_X_SCRIPT_NAME", "")
@@ -95,7 +106,9 @@ if config.DEBUG:
# Create the app!
app = create_app()
app.wsgi_app = ReverseProxied(app.wsgi_app)
if config.SERVER_MODE:
app.wsgi_app = ReverseProxied(app.wsgi_app)
if config.DEBUG:
app.debug = True
+7
View File
@@ -0,0 +1,7 @@
{
"dark": {
"disp_name": "dark_(Beta)",
"cssfile": "pgadmin.theme.dark",
"preview_img": "dark_preview.png"
}
}
+12 -6
View File
@@ -705,18 +705,24 @@ def create_app(app_name=None):
values.pop(config.APP_VERSION_PARAM)
##########################################################################
# Minify output
# Minify output. Not required in desktop mode
##########################################################################
if not config.DEBUG:
from flask_htmlmin import HTMLMIN
HTMLMIN(app)
if not config.DEBUG and config.SERVER_MODE:
from flask_compress import Compress
Compress(app)
from pgadmin.misc.themes import Themes
Themes(app)
@app.context_processor
def inject_blueprint():
"""Inject a reference to the current blueprint, if any."""
"""
Inject a reference to the current blueprint, if any.
"""
return {
'current_app': current_app,
'current_blueprint': current_blueprint
'current_blueprint': current_blueprint,
}
@app.errorhandler(Exception)
+3 -3
View File
@@ -8,10 +8,10 @@
//////////////////////////////////////////////////////////////
define(
['jquery', 'alertify', 'sources/pgadmin', 'underscore.string', 'sources/gettext',
['jquery', 'alertify', 'sources/pgadmin', 'sources/gettext',
'sources/url_for',
],
function($, alertify, pgAdmin, S, gettext, url_for) {
function($, alertify, pgAdmin, gettext, url_for) {
pgAdmin = pgAdmin || window.pgAdmin || {};
/* Return back, this has been called more than once */
@@ -53,7 +53,7 @@ define(
$.get(url_for('about.index'),
function(data) {
alertify.aboutDialog(
S(gettext('About %s')).sprintf(pgAdmin.Browser.utils.app_name).value(), data
gettext('About %s', pgAdmin.Browser.utils.app_name), data
).resizeTo(pgAdmin.Browser.stdW.md, pgAdmin.Browser.stdH.md);
});
},
+15 -8
View File
@@ -792,15 +792,17 @@ def set_master_password():
# Master password is not applicable for server mode
if not config.SERVER_MODE and config.MASTER_PASSWORD_REQUIRED:
# if master pass is set previously
if current_user.masterpass_check is not None:
if data.get('button_click') and \
not validate_master_password(data.get('password')):
return form_master_password_response(
existing=True,
present=False,
errmsg=gettext("Incorrect master password")
)
if data != '' and data.get('password', '') != '':
# if master pass is set previously
if current_user.masterpass_check is not None:
if not validate_master_password(data.get('password')):
return form_master_password_response(
existing=True,
present=False,
errmsg=gettext("Incorrect master password")
)
# store the master pass in the memory
set_crypt_key(data.get('password'))
@@ -827,9 +829,14 @@ def set_master_password():
present=False,
)
elif not get_crypt_key()[0]:
error_message = None
if data.get('button_click') and data.get('password') == '':
# If user attempted to enter a blank password, then throw error
error_message = gettext("Master password cannot be empty")
return form_master_password_response(
existing=False,
present=False,
errmsg=error_message
)
# if master password is disabled now, but was used once then
@@ -54,6 +54,17 @@ def register_browser_preferences(self):
)
)
self.preference.register(
'display', 'confirm_on_properties_close',
gettext("Confirm before Close/Reset in object properties dialog ?"),
'boolean',
True, category_label=gettext('Display'),
help_str=gettext(
'Confirm before closing or resetting the changes in the '
'properties dialog for an object if the changes are not saved.'
)
)
self.preference.register(
'display', 'auto_expand_sole_children',
gettext("Auto-expand sole children"), 'boolean', True,
@@ -723,9 +723,8 @@ class ServerNode(PGChildNodeView):
"""Add a server node to the settings database"""
required_args = [
u'name',
u'port',
u'db',
u'sslmode',
u'username'
]
data = request.form if request.form else json.loads(
@@ -741,7 +740,8 @@ class ServerNode(PGChildNodeView):
if 'service' in data and not data['service']:
required_args.extend([
u'host',
u'db',
u'port',
u'username',
u'role'
])
for arg in required_args:
@@ -9,9 +9,9 @@
define('pgadmin.node.cast', [
'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
'underscore.string', 'sources/pgadmin', 'pgadmin.browser',
'sources/pgadmin', 'pgadmin.browser',
'pgadmin.alertifyjs', 'pgadmin.backform', 'pgadmin.browser.collection',
], function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, alertify, Backform) {
], function(gettext, url_for, $, _, pgAdmin, pgBrowser, alertify, Backform) {
// Extend the collection class for cast
if (!pgBrowser.Nodes['coll-cast']) {
pgAdmin.Browser.Nodes['coll-cast'] =
@@ -0,0 +1,2 @@
COMMENT ON CAST (money AS bigint)
IS 'Cast from money to bigint';
@@ -0,0 +1,2 @@
COMMENT ON CAST (money AS bigint)
IS 'Cast from money to bigint';
@@ -0,0 +1,2 @@
CREATE CAST (money AS bigint)
WITHOUT FUNCTION;
@@ -0,0 +1,3 @@
CREATE CAST (money AS bigint)
WITHOUT FUNCTION
AS IMPLICIT;
@@ -5,6 +5,7 @@
"name": "Create IMPLICIT Cast",
"endpoint": "NODE-cast.obj",
"sql_endpoint": "NODE-cast.sql_id",
"msql_endpoint": "NODE-cast.msql",
"data": {
"castcontext": "IMPLICIT",
"encoding": "UTF8",
@@ -12,17 +13,20 @@
"srctyp": "money",
"trgtyp": "bigint"
},
"expected_sql_file": "create_implicit_cast.sql"
"expected_sql_file": "create_implicit_cast.sql",
"expected_msql_file": "create_implicit_cast_msql.sql"
},
{
"type": "alter",
"name": "Alter IMPLICIT Cast",
"endpoint": "NODE-cast.obj_id",
"sql_endpoint": "NODE-cast.sql_id",
"msql_endpoint": "NODE-cast.msql_id",
"data": {
"description": "Cast from money to bigint"
},
"expected_sql_file": "alter_implicit_cast.sql"
"expected_sql_file": "alter_implicit_cast.sql",
"expected_msql_file": "alter_implicit_cast_msql.sql"
},
{
"type": "delete",
@@ -37,6 +41,7 @@
"name":"Create EXPLICIT Cast",
"endpoint": "NODE-cast.obj",
"sql_endpoint": "NODE-cast.sql_id",
"msql_endpoint": "NODE-cast.msql",
"data": {
"castcontext": "EXPLICIT",
"encoding": "UTF8",
@@ -44,17 +49,20 @@
"srctyp": "money",
"trgtyp": "bigint"
},
"expected_sql": "-- Cast: money -> bigint\n\n-- DROP CAST (money AS bigint);\n\nCREATE CAST (money AS bigint)\n\tWITHOUT FUNCTION;"
"expected_sql": "-- Cast: money -> bigint\n\n-- DROP CAST (money AS bigint);\n\nCREATE CAST (money AS bigint)\n\tWITHOUT FUNCTION;",
"expected_msql_file": "create_explicit_cast_msql.sql"
},
{
"type": "alter",
"name": "Alter EXPLICIT Cast",
"endpoint": "NODE-cast.obj_id",
"sql_endpoint": "NODE-cast.sql_id",
"msql_endpoint": "NODE-cast.msql_id",
"data": {
"description": "Cast from money to bigint"
},
"expected_sql": "-- Cast: money -> bigint\n\n-- DROP CAST (money AS bigint);\n\nCREATE CAST (money AS bigint)\n\tWITHOUT FUNCTION;\n\nCOMMENT ON CAST (money AS bigint) IS 'Cast from money to bigint';"
"expected_sql": "-- Cast: money -> bigint\n\n-- DROP CAST (money AS bigint);\n\nCREATE CAST (money AS bigint)\n\tWITHOUT FUNCTION;\n\nCOMMENT ON CAST (money AS bigint) IS 'Cast from money to bigint';",
"expected_msql_file": "alter_explicit_cast_msql.sql"
},
{
"type": "delete",
@@ -9,9 +9,9 @@
define('pgadmin.node.event_trigger', [
'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
'underscore.string', 'sources/pgadmin', 'pgadmin.browser',
'sources/pgadmin', 'pgadmin.browser',
'pgadmin.backform', 'pgadmin.browser.collection',
], function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform) {
], function(gettext, url_for, $, _, pgAdmin, pgBrowser, Backform) {
// Extend the browser's collection class for event trigger collection
if (!pgBrowser.Nodes['coll-event_trigger']) {
@@ -9,9 +9,9 @@
define('pgadmin.node.extension', [
'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
'underscore.string', 'sources/pgadmin', 'pgadmin.browser',
'sources/pgadmin', 'pgadmin.browser',
'pgadmin.backform', 'pgadmin.browser.collection',
], function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, Backform) {
], function(gettext, url_for, $, _, pgAdmin, pgBrowser, Backform) {
/*
* Create and Add an Extension Collection into nodes
@@ -0,0 +1,2 @@
ALTER EXTENSION sslinfo
SET SCHEMA public;
@@ -0,0 +1,2 @@
ALTER EXTENSION citext
UPDATE TO "1.1";
@@ -0,0 +1,3 @@
CREATE EXTENSION sslinfo
SCHEMA test_extension_schema
VERSION "1.0";
@@ -5,23 +5,27 @@
"name": "Create Extension with all options",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql",
"data": {
"name": "sslinfo",
"schema": "test_extension_schema",
"version": "1.0"
},
"expected_sql_file": "create_extension_with_all_options.sql",
"expected_msql_file": "msql_create_extension_with_all_options.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='sslinfo' and e2.version='1.0';"
},
{
"type": "alter",
"name": "Alter Extension version",
"name": "Alter Extension schema",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql_id",
"data": {
"schema": "public"
},
"expected_sql_file": "alter_extension_schema.sql",
"expected_msql_file": "msql_alter_extension_schema.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='sslinfo' and e2.version='1.0';"
},
{
@@ -36,11 +40,13 @@
"name": "Create Extension with default schema",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql",
"data": {
"name": "citext",
"version": "1.0"
},
"expected_sql_file": "create_extension_with_default_schema.sql",
"expected_msql_file": "msql_create_extension_with_default_schema.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='citext' and e2.version='1.0';"
},
{
@@ -48,10 +54,12 @@
"name": "Alter Extension version",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql_id",
"data": {
"version": "1.1"
},
"expected_sql_file": "alter_extension_version.sql",
"expected_msql_file": "msql_alter_extension_version.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='citext' and e2.version='1.1';"
},
{
@@ -0,0 +1,2 @@
ALTER EXTENSION sslinfo
SET SCHEMA public;
@@ -0,0 +1,3 @@
CREATE EXTENSION sslinfo
SCHEMA test_extension_schema
VERSION "1.0";
@@ -5,23 +5,27 @@
"name": "Create Extension with all options",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql",
"data": {
"name": "sslinfo",
"schema": "test_extension_schema",
"version": "1.0"
},
"expected_sql_file": "create_extension_with_all_options.sql",
"expected_msql_file": "msql_create_extension_with_all_options.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='sslinfo' and e2.version='1.0';"
},
{
"type": "alter",
"name": "Alter Extension version",
"name": "Alter Extension schema",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql_id",
"data": {
"schema": "public"
},
"expected_sql_file": "alter_extension_schema.sql",
"expected_msql_file": "msql_alter_extension_schema.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='sslinfo' and e2.version='1.0';"
},
{
@@ -0,0 +1,2 @@
ALTER EXTENSION sslinfo
SET SCHEMA public;
@@ -0,0 +1,2 @@
ALTER EXTENSION adminpack
UPDATE TO "1.1";
@@ -0,0 +1,3 @@
CREATE EXTENSION sslinfo
SCHEMA test_extension_schema
VERSION "1.2";
@@ -0,0 +1,2 @@
CREATE EXTENSION adminpack
VERSION "1.0";
@@ -5,23 +5,27 @@
"name": "Create Extension with all options",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql",
"data": {
"name": "sslinfo",
"schema": "test_extension_schema",
"version": "1.2"
},
"expected_sql_file": "create_extension_with_all_options.sql",
"expected_msql_file": "msql_create_extension_with_all_options.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='sslinfo' and e2.version='1.2';"
},
{
"type": "alter",
"name": "Alter Extension version",
"name": "Alter Extension schema",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql_id",
"data": {
"schema": "public"
},
"expected_sql_file": "alter_extension_schema.sql",
"expected_msql_file": "msql_alter_extension_schema.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='sslinfo' and e2.version='1.2';"
},
{
@@ -36,11 +40,13 @@
"name": "Create Extension with default schema",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql",
"data": {
"name": "adminpack",
"version": "1.0"
},
"expected_sql_file": "create_extension_with_default_schema.sql",
"expected_msql_file": "msql_create_extension_with_default_schema.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='adminpack' and e2.version='1.0';"
},
{
@@ -48,10 +54,12 @@
"name": "Alter Extension version",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"msql_endpoint": "NODE-extension.msql_id",
"data": {
"version": "1.1"
},
"expected_sql_file": "alter_extension_version.sql",
"expected_msql_file": "msql_alter_extension_version.sql",
"precondition_sql": "select count(e1.name) \nfrom pg_available_extensions e1, pg_available_extension_versions e2\nwhere e1.name = e2.name and e1.name='adminpack' and e2.version='1.0';"
},
{
@@ -8,10 +8,10 @@
//////////////////////////////////////////////////////////////
define('pgadmin.node.foreign_server', [
'sources/gettext', 'jquery', 'underscore', 'underscore.string', 'sources/pgadmin',
'sources/gettext', 'jquery', 'underscore', 'sources/pgadmin',
'pgadmin.browser', 'pgadmin.backform', 'pgadmin.browser.collection',
'pgadmin.browser.server.privilege',
], function(gettext, $, _, S, pgAdmin, pgBrowser, Backform) {
], function(gettext, $, _, pgAdmin, pgBrowser, Backform) {
// Extend the browser's node model class to create a Options model
var OptionsModel = pgAdmin.Browser.Node.Model.extend({
@@ -19,3 +19,4 @@ FROM
LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
GROUP BY g.rolname, gt.rolname
ORDER BY grantee
@@ -15,7 +15,6 @@ CREATE SERVER {{ conn|qtIdent(data.name) }}{% if data.fsrvtype %}
{# ============= Set the owner for foreign server ============= #}
{% if data.fsrvowner %}
ALTER SERVER {{ conn|qtIdent(data.name) }}
OWNER TO {{ conn|qtIdent(data.fsrvowner) }};
{% endif %}
@@ -31,4 +31,4 @@ COMMENT ON SERVER {{ conn|qtIdent(data.name) }}
{% for priv in data.fsrvacl %}
{{ PRIVILEGE.APPLY(conn, 'FOREIGN SERVER', priv.grantee, data.name, priv.without_grant, priv.with_grant) }}{% endfor %}
{% endif %}
{% endif %}
{% endif %}
@@ -0,0 +1,13 @@
-- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
-- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
VERSION '1.1'
FOREIGN DATA WRAPPER test_fdw_for_fs;
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
@@ -0,0 +1,5 @@
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
VERSION 1.1;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
@@ -0,0 +1,18 @@
-- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
-- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
VERSION '1.1'
FOREIGN DATA WRAPPER test_fdw_for_fs
OPTIONS (host '192.168.1.1', dbname 'edb', port '5450');
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO postgres;
@@ -0,0 +1,4 @@
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OPTIONS (ADD host '192.168.1.1', ADD dbname 'edb', ADD port '5450');
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
@@ -0,0 +1,15 @@
-- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
-- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
VERSION '1.1'
FOREIGN DATA WRAPPER test_fdw_for_fs;
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO postgres;
@@ -0,0 +1,4 @@
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OPTIONS (DROP host, DROP dbname, DROP port);
REVOKE ALL ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" FROM PUBLIC;
@@ -0,0 +1,18 @@
-- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
-- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
TYPE 'oracle'
VERSION '1.1'
FOREIGN DATA WRAPPER test_fdw_for_fs
OPTIONS (host '192.168.1.1', dbname 'edb', port '5450');
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO postgres;
@@ -0,0 +1,13 @@
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
TYPE 'oracle'
VERSION 1.1
FOREIGN DATA WRAPPER test_fdw_for_fs
OPTIONS (host '192.168.1.1', dbname 'edb', port '5450');
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
GRANT USAGE ON FOREIGN SERVER "FS_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
@@ -0,0 +1,159 @@
{
"scenarios": [
{
"type": "create",
"name": "Create FDW for foreign server",
"endpoint": "NODE-foreign_data_wrapper.obj",
"sql_endpoint": "NODE-foreign_data_wrapper.sql_id",
"data": {
"name": "test_fdw_for_fs",
"fdwacl": [],
"fdwoptions": []
},
"store_object_id": "True"
}, {
"type": "create",
"name": "Create foreign server with all options",
"endpoint": "NODE-foreign_server.obj",
"sql_endpoint": "NODE-foreign_server.sql_id",
"msql_endpoint": "NODE-foreign_server.msql",
"data": {
"name":"FS_$%{}[]()&*^!@\"'`\\/#",
"fsrvtype":"oracle",
"fsrvversion":"1.1",
"fsrvoptions":[
{
"fsrvoption":"host",
"fsrvvalue":"192.168.1.1"
},{
"fsrvoption":"dbname",
"fsrvvalue":"edb"
},{
"fsrvoption":"port",
"fsrvvalue":"5450"
}],
"fsrvowner":"postgres",
"description":"Test comment",
"fsrvacl":[{
"grantee":"PUBLIC",
"grantor":"postgres",
"privileges":[{
"privilege_type":"U",
"privilege":true,
"with_grant":false
}]
}]
},
"expected_sql_file": "create_fs_all_options.sql",
"expected_msql_file": "create_fs_all_options_msql.sql"
}, {
"type": "delete",
"name": "Drop foreign server",
"endpoint": "NODE-foreign_server.delete_id",
"data": {
"name": "FS_$%{}[]()&*^!@\"'`\\/#"
}
}, {
"type": "create",
"name": "Create foreign server",
"endpoint": "NODE-foreign_server.obj",
"sql_endpoint": "NODE-foreign_server.sql_id",
"data": {
"name":"FS_$%{}[]()&*^!@\"'`\\/#",
"fsrvowner":"postgres"
}
}, {
"type": "alter",
"name": "Alter foreign server comment and version",
"endpoint": "NODE-foreign_server.obj_id",
"sql_endpoint": "NODE-foreign_server.sql_id",
"msql_endpoint": "NODE-foreign_server.msql_id",
"data": {
"fsrvversion":"1.1",
"description":"Test comment"
},
"expected_sql_file": "alter_comment_version.sql",
"expected_msql_file": "alter_comment_version_msql.sql"
}, {
"type": "alter",
"name": "Alter foreign server add options and privileges",
"endpoint": "NODE-foreign_server.obj_id",
"sql_endpoint": "NODE-foreign_server.sql_id",
"msql_endpoint": "NODE-foreign_server.msql_id",
"data": {
"fsrvoptions":{
"added": [{
"fsrvoption":"host",
"fsrvvalue":"192.168.1.1"
},{
"fsrvoption":"dbname",
"fsrvvalue":"edb"
},{
"fsrvoption":"port",
"fsrvvalue":"5450"
}]
},
"fsrvacl":{
"added": [{
"grantee":"PUBLIC",
"grantor":"postgres",
"privileges":[{
"privilege_type":"U",
"privilege":true,
"with_grant":false
}]
}]
}
},
"expected_sql_file": "alter_options_privileges.sql",
"expected_msql_file": "alter_options_privileges_msql.sql"
}, {
"type": "alter",
"name": "Alter foreign server add options and privileges",
"endpoint": "NODE-foreign_server.obj_id",
"sql_endpoint": "NODE-foreign_server.sql_id",
"msql_endpoint": "NODE-foreign_server.msql_id",
"data": {
"fsrvoptions":{
"deleted": [{
"fsrvoption":"host",
"fsrvvalue":"192.168.1.1"
},{
"fsrvoption":"dbname",
"fsrvvalue":"edb"
},{
"fsrvoption":"port",
"fsrvvalue":"5450"
}]
},
"fsrvacl":{
"deleted": [{
"grantee":"PUBLIC",
"grantor":"postgres",
"privileges":[{
"privilege_type":"U",
"privilege":true,
"with_grant":false
}]
}]
}
},
"expected_sql_file": "alter_remove_options_priv.sql",
"expected_msql_file": "alter_remove_options_priv_msql.sql"
}, {
"type": "delete",
"name": "Drop foreign server",
"endpoint": "NODE-foreign_server.delete_id",
"data": {
"name": "FS_$%{}[]()&*^!@\"'`\\/#"
}
}, {
"type": "delete",
"name": "Drop FDW",
"endpoint": "NODE-foreign_data_wrapper.delete_id",
"data": {
"name": "test_fdw_for_fs"
}
}
]
}
@@ -0,0 +1,13 @@
-- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
-- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
VERSION '1.1'
FOREIGN DATA WRAPPER test_fdw_for_fs;
ALTER SERVER "FS_$%{}[]()&*^!@""'`\/#"
OWNER TO enterprisedb;
COMMENT ON SERVER "FS_$%{}[]()&*^!@""'`\/#"
IS 'Test comment';
Loaded 100 of 856 files, more files were not shown because too many files have changed in this diff. Show more