Commit Graph

307 Commits

Author SHA1 Message Date
Harshal Dhumal
875360d1c8 When we use deps functionality, backform controls re-render then. But before we re-render them we must remove old grid (if any) otherwise is causes js error "Unable to call exitEditMode of undefined". Fixes #1497 2016-07-25 14:31:17 +01:00
Neel Patel
dbd3c7f4c5 Allow creation of FDWs if the extension is in a non-default schema. Fixes #1320
Root cause:-

When user change schema of already created fdw extension then while creating the new fdw we should append the <schema_name>.<fdw_handler_name>.
Previously we added only <fdw_handler_name> so while executing the query it will not be able to find fdw handler name without schema name.

e.g. If user changed the fdw handler 'postgres_fdw_handler' under schema 'test' then we should display the handler  name under fdw as "test. postgres_fdw_handler".

Solution:-

With this patch, we have added <schema_name>.<fdw_handler_name> so while creating or updating the fdw, proper sql will be generated.
2016-07-25 12:48:11 +01:00
Surinder Kumar
91559c622b Fixes for function, procedure and trigger reverse SQL. Fixes #1293. Fixes #1294
1. RM#1293 - SQL pane is not displaying GRANT queries in functions node
2. RM#1294 - Comments are not visible in sql pane for trigger functions and functions

Explanation:
Previously we we using 'get_defintion.sql' template to generate SQL for SQL pane for functions, procedure & trigger functions node.
but GRANT statements and COMMENTS changes were missing. In order to fix that, now we have used both 'create.sql' and 'get_definition.sql' templates to generate full SQL query for SQL pane.
2016-07-22 16:38:21 +01:00
Dave Page
60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Dave Page
f783aeac63 Change button label to initcap. 2016-07-21 17:18:15 +01:00
Murtuza Zabuawala
3d7b40e111 Fix support for security labels. Fixes #1457 2016-07-21 16:35:35 +01:00
Dave Page
f17c2e3b84 Enhancements to the regression test suite.
Navnath Gadakh and Priyanka Shendge
2016-07-18 14:50:21 +01:00
Harshal Dhumal
c7d25c33f2 Make the Parameter grid use a workflow consistent with other grids. Fixes #1241
1. Altered variable control to make its UI consistent with privileges and Security labels.
2. Changed datamodel.js to handle duplicate rows at datamodel level and not UI/Control level. (See variable control for example)
2016-07-18 11:50:42 +01:00
Murtuza Zabuawala
e94b14e7d7 Fix the issue in MATERIALIZED VIEW node where user was not able to add/update security label. Fixes #1458 2016-07-15 12:13:57 +01:00
Surinder Kumar
efb254c966 Ensure newly created database can be dropped. 2016-07-15 10:14:11 +01:00
Murtuza Zabuawala
573abbe6ef Allow users to select a data type with the keyboard only when creating a column in the subnode grid. Sanitise the list of fields shown. 2016-07-15 10:12:23 +01:00
Murtuza Zabuawala
fdcb9d2a57 Fix an issue in procedure node where users were not able to create a new procedure when they provide arguments. Fixes #1416 2016-07-13 14:57:08 +01:00
Murtuza Zabuawala
f79ca32e45 Allow selection of 'PUBLIC' as a role in privileges. Fixes #1416 2016-07-13 14:51:25 +01:00
Murtuza Zabuawala
ae692d2416 Display comments on languages. Fixes #1412 2016-07-13 14:45:34 +01:00
Surinder Kumar
f58c4df85d Fix incomplete reverse engineered SQL for databases. Fixes #1420 2016-07-13 12:42:01 +01:00
Harshal Dhumal
4077de2187 Fix Select2 issues. Fixes #1418. Fixes #1434
1. Select2 control fixed for multi-select mode.
2. Index constrains (primary and unique key) fixed column listing issue.
3. Table node "inherited from" (Select2 control) was not showing table name with public schema
2016-07-05 12:58:48 +01:00
Dave Page
d4c3b1bcff Fix trigger function help link. Fixes #1410 2016-07-02 17:24:21 +01:00
Dave Page
685b2f4ab7 Correct label 2016-06-30 14:05:10 +01:00
Murtuza Zabuawala
8246fc56e8 Offer the various serial pseudo-types as column type options. Fixes #1393 2016-06-29 19:50:43 +01:00
Murtuza Zabuawala
4bb849c58c Allow toggling of the Primary Key option in the un-expanded column grid when defining a table. Fixes #1235 2016-06-24 14:05:59 +01:00
Murtuza Zabuawala
8b0e65dc57 Allow default ACLs to be specified when creating schemas. Fixes #1108. 2016-06-23 13:03:18 +01:00
Dave Page
5928f70a1d Fix default ACL queries which were using invalid values for defaclobjtype. 2016-06-23 13:02:30 +01:00
Dave Page
4983eb2f1c Fix SQL formatting. Fixes #1234 2016-06-23 12:14:23 +01:00
Murtuza Zabuawala
e5ee592470 Don't offer an option to drop the current maintenance database. Fixes #1382 2016-06-23 11:37:32 +01:00
Ashesh Vashi
b78b3904cd Use PUBLIC (in caps) whenever used as a keyword. Fixes #1138 2016-06-23 09:15:09 +05:30
Dave Page
7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page
3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Sanket Mehta
03d348f7c2 Fix SELECT Script option for functions. Fixes #1191 2016-06-21 13:29:55 +01:00
Murtuza Zabuawala
3210975568 Fix creation of exclusion constraints. Fixes #1301 2016-06-21 12:01:39 +01:00
Khushboo Vashi
40b075389f Add missing foreign table column options.
Fixes #1351
2016-06-20 13:45:37 +01:00
Murtuza Zabuawala
ac37d60c03 Fix the issue in Materialized view where user was not able to create Materialized view with PPAS 9.5 due to incorrect template path.
Fixes #1379
2016-06-20 10:03:38 +01:00
Dave Page
3bcc5a4bd3 Further string improvements. 2016-06-17 14:51:01 +01:00
Murtuza Zabuawala
014eb2a5c2 Don't allow creation of edbspl trigger functions (they should be created as part of the trigger). Fixes #1212. 2016-06-17 13:46:42 +01:00
Murtuza Zabuawala
71ec9ef914 Add stats on Sequences/Functions/Trigger functions collection nodes. Fixes #1299 2016-06-15 11:53:58 +01:00
Murtuza Zabuawala
1f9d0ffc54 Fix comment removal for various nodes. Fixes #1331 2016-06-13 16:22:50 +01:00
Sanket Mehta
d5a91c969c Ensure the properties dialogues create objects in a single transaction/statement. Fixes #1107 2016-06-10 16:07:24 +01:00
Surinder Kumar
802840fd7f Fix various cosmetic issues with preference dialog
1. Foreign keys listed twice
The label for Exclusion constraint was set to 'Foreign keys'. fixed it.
2. Trigger function, Unique constraint, Primary key should be in title case
3. if user click outside of Preferences window it disappear (it should not disappear)
set preference alertify dialog option closableByDimmer to false.
4. Columns node settings listed twice
Override the register_preferences method in Columns CatalogObjectColumnsModule class
because there are two types of columns node, catalogs columns and tables columns.
so the settings for table columns should also work for catalog columns. Thats why we are not showing preference option for catalogs column node.
Ashesh fixed this issue.
2016-06-08 13:29:49 +01:00
Murtuza Zabuawala
d7f5e95b2b Fix unwanted space indentation issue in Database node. 2016-06-08 12:56:56 +01:00
Murtuza Zabuawala
4ace8bb5b6 Statistics support remaining object types that support them. 2016-06-07 13:16:12 +01:00
Harshal Dhumal
7f1e57c2a6 Remove the header controls of subnode control properly, when removing it
from the VariableControl, and the customized TokenControl in the
fts_configuration javascript module during clean up process.
2016-06-06 18:53:19 +05:30
Murtuza Zabuawala
6dbfb7db7e Fixes #1273 - Resolved an issue setting privileges on the SHELL type. 2016-06-03 15:58:10 +05:30
Murtuza Zabuawala
c14ff8e15e Fixes #1300 - Honour show system object in the table dialog, and do not
show catalog schema tables.
2016-06-03 15:45:13 +05:30
Murtuza Zabuawala
6036c431b0 Fixes #1283, #1287 - Do not show null description in the create mode,
corrected the index expression on table node.

Reported by Thom Brown.
2016-06-03 15:41:24 +05:30
Harshal Dhumal
ab9f63d960 Fixes# 1210 - Send the columns SQL with proper mime type. 2016-06-03 15:24:39 +05:30
Murtuza Zabuawala
40ab0b7c88 Fixes #1298 - ACL for the SEQUENCE node were not parsed properly. 2016-06-03 15:23:14 +05:30
Susan Douglas
e47671edaa Table dialog and backup tool docs 2016-06-02 14:05:46 +01:00
Murtuza Zabuawala
1f25e90fa4 Fixes #1276 - Resolved an issue - 'TypeError: c is undefined on removing
member type from Type=composite'.
2016-06-02 15:31:07 +05:30
Ashesh Vashi
e18b135f6f Rename the 'Auto Vacuum' tab to 'Parameter' as it represents 'Storage
Parameters'.
2016-06-02 15:28:32 +05:30
Surinder Kumar
2610eaefbe Fixes# 1290 - Use qtLiteral with parameterized values.
When not using qtLiteral, it was result into an error - "unknown
error displayed when modify comments which may special characters on
Materialized view".
2016-06-02 15:08:24 +05:30
Murtuza Zabuawala
60208b7ae5 Fixes an issue rendering the dashboard, when data object is missing.
Also, fixed an issue checking the existence of the data object before
accessing it in schema javascript module.
2016-06-02 14:58:14 +05:30
Ashesh Vashi
486da5e12c Fixed issue only coming in the runtime.
* Do not need to translate an empty string. (that results into the
  translation header inclusion in the javacript module).
* String.prototype.StartsWith is not an well received function, it has
  not been available in the QWebkit for linux.
2016-06-02 13:15:26 +05:30
Murtuza Zabuawala
4482bbb1ba Fixed a typo in Type node javascript module. 2016-05-31 23:29:50 +05:30
Khushboo Vashi
b4d195aafe Fixes #1278 - Load the foreign server node javascript module when
databases (not when servers) are being loaded.
2016-05-31 23:26:55 +05:30
Surinder Kumar
4aaa58352c Support for the 'Refresh CONCURRENTLY' is applicable only on the
database server >= 9.4.
2016-05-30 17:01:04 +05:30
Murtuza Zabuawala
f4cb7d8f9c Fixes #1231, #1237
* 'Of type' can't be used with 'Like'.
* 'Of type' usage conflicts with adding columns.
2016-05-29 16:02:08 +05:30
Surinder Kumar
6cb83f08d6 Load nodes under the schema at database level.
The following node module script will be loaded, when first database
node object is added in the browser tree.
* Domains
* Foreign tables
* FTS Configuration
* FTS Dictionary, and
* Functions

Icons for these modules needs to be shown in the dependents list.
2016-05-29 15:33:35 +05:30
Murtuza Zabuawala
c96f28b66f Fixes #1123 - Options other than 'Create' are not available in the
procedure node.

This patch also includes other fixes related 'procedure' node as below:
* Generate correct statement for dropping procedure.
* Fetch the missing schema name for the EXEC script.
* Removed the 'DROP CASCADE' menu options, as it is not supported by
  procedure.
2016-05-29 15:28:17 +05:30
Ashesh Vashi
7e51a8fd56 Improvement in the security tab for each of the nodes.
* Hide the security tab for the objects under the catalog schema.
  Patched by Surinder Kumar, vastly improved by me.

* Make the securtiy label across all the nodes, using the same backbone
  model across the nodes, and make changes in the backend code for the
  same.
2016-05-29 15:19:36 +05:30
Murtuza Zabuawala
100f075510 Fixes #1142 - Update the comments in edit mode for the function,
procedure, trigger function nod objects.
2016-05-28 19:47:12 +05:30
Murtuza Zabuawala
fd0d740acc Fixes #1143 - Update the comments in edit mode for the foreign data
wrapper, and foreign table objects.
2016-05-28 19:45:12 +05:30
Sanket Mehta
2fb1e96e2f Fixes #1113 - Casts should be in alphabetical order. 2016-05-28 18:57:26 +05:30
Susan Douglas
b482ba6ce9 Additional documentation pages for dialogs. 2016-05-27 17:13:36 +01:00
Dave Page
b85fa58344 Additional docs from Susan. 2016-05-26 15:29:33 +01:00
Dave Page
7aea8f8536 s/domain-constraints/domain_constraints for consistency. 2016-05-26 15:27:06 +01:00
Surinder Kumar
6f2c8cfb31 Fixing couple issues with some of the nodes.
* Added 'catalog' as parent type for the domain, procedure nodes.
* Proper initialization of the FTS Configuration, FTS Parser, FTS
  Dictionary, FTS Template Nodes.
* Proper Indentation in collection.js
2016-05-26 11:19:17 +05:30
Murtuza Zabuawala
db79f3ff3d Fixes #1150 - Disconnecting a database action should followed by
updating the menu state according to its current state.
2016-05-25 17:44:39 +05:30
Murtuza Zabuawala
b1aa956af8 Fixes #1118 - Handle null, or empty string for the comments in Jinja2
template for Sequence Node.
2016-05-25 17:37:06 +05:30
Ashesh Vashi
d20db0f43e Defined SwitchDepsCell in the schema javascript module, because - it
will be loaded before every other javascript module requires this Cell.
2016-05-25 01:01:02 +05:30
Surinder Kumar
05dde57651 Fixes #1207 - Unable to comments on materialized view with Postgres Plus
Advanced Server.

Made changes in the query templates for create, view-id, and update to
make it work properly with it.
2016-05-25 00:48:41 +05:30
Surinder Kumar
c0ab396fad Fixes #1213 - Dropping the materialized view using an non-super user
results into an error - "list index out of range".

Using correct variable name while accessing parameter from an
dictionary.
2016-05-25 00:45:38 +05:30
Surinder Kumar
3b3cf7502b Added support for the CREATE script for View and Materialized View, and
SELECT & INSERT support for the Materialized View Node.
2016-05-24 23:53:19 +05:30
Murtuza Zabuawala
af84ba5a4f Fixed all the review comments from Dave.
* Moved the Columns, and Constraint to its repective tabs.
* Ensure all the labels only have a capital letter on the first word
  (except for keywords or acronyms).
* Resolve the typo in string - 'System table'.
* Error messages on fields should not be shown unless the field loses
  focus and has an error.
* "General" section should have a limited subset of information.
* Variables grids should not be on the Security tab.
* Fixes the field labels that imply a question.
* Privileges controls on the Properties lists should be in a "Security"
  group.

Apart from review comments improved few other areas too:
* Used in-place DepsCell functionality for columns in both index, and
  type node.
* Improved the error handling in constraint nodes.
* Added create, alert SQL Help for nodes associated with the table node.
2016-05-24 23:29:55 +05:30
Murtuza Zabuawala
aa1c283514 Added Insert/Delete/Update script functionality for foreign table objects 2016-05-24 12:41:00 +05:30
Murtuza Zabuawala
d2eaa8b3dd Adding support for the trigger functions node. 2016-05-21 15:09:44 +05:30
Ashesh Vashi
875e251359 Allow to specify the height & width from the javascript modules of an
individual node.
2016-05-21 14:18:26 +05:30
Dave Page
238da58732 Helpfile refactoring. 2016-05-20 16:39:35 -04:00
Surinder Kumar
ecde42cbed Implementation of View & Materialized View 2016-05-20 17:43:30 +05:30
Akshay Joshi
4dbe058832 Implementation of Table, Column, Index, Trigger, Constraints and Rule Node.
- Table, Column, Index and Trigger (Author:- Murtuza Zabuawala)
 - Constraints Primary Key/Unique/Check/Foreign Key/Exclusion
     with integration into Table node (Author:- Harshal Dhumal)
 - Rule (Author:- Surinder Kumar)
 - Vacuum Control (Initial patch by Surinder Kumar and further enhancement by Murtuza)
2016-05-20 17:15:52 +05:30
Sanket Mehta
6895da9cbc Added support for FTS configuration node 2016-05-19 21:04:07 +05:30
Dave Page
1606f1d8e8 Link online help to dialogs 2016-05-16 22:35:27 -04:00
Khushboo Vashi
d1e2b902dc Add support for foreign server 2016-05-16 01:42:09 +05:30
Murtuza Zabuawala
5ca63fba48 Initial version for generationg the CREATE/SELECT/EXEC scripts for the
selected node.
2016-05-16 00:25:34 +05:30
Ashesh Vashi
491bd3605b Fixed an issue creating extensions 'postgis_topology', and
'postgis_tiger_geocoder'.

Current implementation changes the schema name, whenever we chance the
name, which is wrong. We should have not change the schema for this
event.

Thanks Fahar Abbas for reporting.
2016-05-14 15:42:25 +05:30
Sanket Mehta
817bdd0108 Fixed typos in FTS DICTIONARY node 2016-05-10 12:53:39 +05:30
Karen Blatchley
949e536bae First round of string review and cleanup. 2016-05-06 13:53:48 +01:00
Ashesh Vashi
32e0a0d4b6 Clear the node cache, when an node is created/updated to make sure - we
will always have latest data related to that type of node. Also, fixed
the cache_level for different node types.

This commit also contains fixes for the following issue:
* In extension module - use the 'node-list-by-name' instead of using a
  custom 'node-ajax-options' control, and removed redundant template
  schemas from it.
* When we tries to destroy the select2 object from
  Select2Cell/Select2Control while releasing the properties view,
  sometimes select2 can not find the instance related it for some
  unknown reason. Hence - before removing it we will check for manual
  instance existance using $.data('select2').
* When we traverse through the browser tree nodes very quickly, it tries
  to remove the object before it gets created completely, and results
  into an exception.
* Icon in the select2 drop down list was not visible due to some CSS
  issues.

Apart of that, we will generate two new browser events -
'pgadmin-node:created:<NODE-TYPE>', 'pgadmin-node:updated:<NODE-TYPE>'
whenever a new node is created, or an existing node will be updated.
2016-04-29 15:50:38 +05:30
Sanket Mehta
244f5d59d2 Resolved an issue - fetching the source, and target type functions in
the CAST module. Make the changes in the CAST module too for the
changes done in the NodeAjaxOptionsControl in the commit-id:
944bdbb96c.

We've changed the signature (arguments) of the 'options' & 'transform'
functions.
2016-04-22 18:04:09 +05:30
Neel Patel
37699a9820 Don't try to use the template engine's gettext on Javascript variables, as it won't work as the templates are evaluated before any JS is executed. 2016-04-18 08:39:25 -04:00
Sanket Mehta
1b442cff41 FTS Dictionary support (icons) 2016-04-14 20:54:14 +01:00
Sanket Mehta
7305986e14 FTS Dictionary support. 2016-04-14 20:53:14 +01:00
Sanket Mehta
b47577390a Fix issue renaming FTS Parser. 2016-04-14 20:14:32 +01:00
Dave Page
e09aa90614 Rename "Parameters" to "Arguments" and "Variables" to "Parameters" for consistency with the PG docs.
Per Susan Douglas.
2016-04-14 20:11:55 +01:00
Murtuza Zabuawala
49e433db4f Type fixes:
- Renaming or changing the schema for a shell type should not be allowed.

- I'm allowed to try to add ACL entries or security labels to an
existing shell type. This should be disallowed.

- Changing the schema on a (non-shell) type doesn't work - the type
name is omitted, e.g.

ALTER TYPE pem
    SET SCHEMA pemhistory;

Which should be:

ALTER TYPE pem.foo
    SET SCHEMA pemhistory;
2016-04-14 15:46:25 +01:00
Murtuza Zabuawala
c047abd8a4 Fix various issues with Types, per discussion 2016-04-14 12:37:19 +01:00
Ashesh Vashi
8a39b3a700 Backend changes to fetch the statistics for the database and server
nodes, along with the front-end changes for those node.

NOTE:
We've not yet added the support to show them on the front-end.
2016-04-14 16:45:34 +05:30
Dave Page
dd5e86bcf4 Fix label 2016-04-13 10:55:12 +01:00
Dave Page
62fcfd928d Add context-sensitive SQL help. 2016-04-12 13:36:06 +01:00
Ashesh Vashi
95ffc908ce Changed the logic of transform function as per new implementation logic
of Select2Control.

Also, added missing translation functions for few strings.
2016-04-08 11:10:34 +05:30
Dave Page
34a803fc68 FTS Parser support 2016-04-07 20:59:09 +01:00
Sanket Mehta
d6d6361de5 FTS Parser support 2016-04-07 20:58:29 +01:00
Dave Page
680339ff20 Fix node type label 2016-04-07 20:57:45 +01:00
Dave Page
441a29f59c String tweaks. 2016-04-07 20:51:31 +01:00
Sanket Mehta
95566ed5e1 FTS Template support. 2016-04-07 15:01:56 +01:00
Murtuza Zabuawala
ca277bc8b6 Type support 2016-04-07 12:27:33 +01:00
Khushboo Vashi
2add0155a3 Add support for domains. 2016-04-05 16:32:36 +01:00
Surinder Kumar
d1eb3fd9d5 Utility functions for trigger and rule nodes, centralised because they're also utilised by the view node. 2016-04-05 16:19:55 +01:00
Khushboo Vashi
5ed7015ebc Add support for functions and procedures. 2016-04-05 16:14:10 +01:00
Ashesh Vashi
40165f2d1e Honour the 'show_system_object' flag when generating the list of schema nodes. 2016-04-05 16:37:54 +05:30
Dave Page
1ac16cbc0f We have defaults for switch display now, so no need to set the options explicitly. 2016-03-23 11:53:07 +00:00
Dave Page
258c7f3589 Don't display packages as schemas. 2016-03-23 11:52:11 +00:00
Murtuza Zabuawala
3432481f9a Properly name the dbo and sys catalogs in PPAS. 2016-03-18 15:16:18 +00:00
Ashesh Vashi
611c9c4ae7 Disable the menu to create database and tablespace, if:
* Database server is not connected.
* Do not have adequate permission to create.
2016-03-18 10:31:57 +05:30
Sanket Mehta
71badac203 Support "show system objects" in casts. 2016-03-17 11:49:11 +00:00
Neel Patel
3969e91563 Add support for Foreign data wrappers, servers and user mappings. 2016-03-17 11:39:38 +00:00
Dave Page
41805d40b5 Sort all nodes when loading. 2016-03-16 10:31:20 +00:00
Khushboo Vashi
a18553bd8c Add a data type reader utility. 2016-03-16 09:54:30 +00:00
Arun Kollan
c814698328 Fix security label sizing. 2016-03-15 15:07:40 +00:00
Arun Kollan
cdd7a1f637 Subnode collection layout improvements, with additional tweaks from me. 2016-03-15 12:30:01 +00:00
Dave Page
fd05dec29c Default owner for new event triggers. 2016-03-11 16:58:46 +00:00
Murtuza Zabuawala
b6f7202448 Add support for collations. 2016-03-11 13:40:28 +00:00
Dave Page
c0086b092f Fix a number of minor issues with catalog objects:
- Remove unnecessary columns from collection property lists.
- Standardise property names and groupings.
- pg_attribute doesn't have an OID column, so use attnum instead (of atttypid!?!)
2016-03-11 10:09:23 +00:00
Dave Page
470881ac46 Fix cast SQL formatting. 2016-03-11 09:45:43 +00:00
Murtuza Zabuawala
5347bdb886 Added support for the catalog objects under special catalogs. (also,
added support for columns under it).
2016-03-11 01:09:06 +05:30
Ashesh Vashi
87623cb997 Resolved few typos, comments, and also some query correction in the SQL
templates for different nodes.
2016-03-11 01:02:25 +05:30
Dave Page
b7f6df34ab Fixup some SQL formatting, per Khushboo 2016-03-10 17:23:59 +00:00
Dave Page
649b719845 Variables should have their own tab on dialogues. 2016-03-10 17:15:58 +00:00
Dave Page
83a662f798 Fix all manner of inconsistencies in object properties display:
- Don't display the OID on Edit dialogues
- Use the ACL summary display in the properties panel, not the subnode editor.
- s/Oid/OID/g
- Ensure all security properties are displayed in the Security group
- Ensure all object definition values are stored in the Definition (or a more precise) group, not General.
- Fix the ordering of General properties so the comment is always show last.
2016-03-10 17:08:27 +00:00
Dave Page
62537429d1 Show the ACL summary on the properties panel for databases. 2016-03-10 16:21:17 +00:00
Dave Page
2b6c8dff0b Fix various inconsistencies with databases and tablespaces:
- Display the ACL string in properties, not the subnode panel.
- Offer default values for the owner of new objects.
- Add missing context menu option to create a tablespace from a server node.
2016-03-10 16:14:26 +00:00
Harshal Dhumal
def1a30251 Add support for Sequences. 2016-03-10 15:23:04 +00:00
Harshal Dhumal
986375d60e Add support for Event Triggers. 2016-03-10 13:38:31 +00:00
Khushboo Vashi
d32e861a47 Updated Privileges macros under Schema node.
The changes are required due to previous commit (8a7ec6b452) regarding "parse_priv_to_db" function.
2016-03-10 12:01:13 +00:00
Ashesh Vashi
77ae220f1e Resolved typos in SQL templates for PPAS
Thanks Khushboo Vashi for reporting.
2016-03-10 14:56:46 +05:30
Dave Page
a92d4841d1 Add support for Schemas and Catalogs.
Initial patch by Murtuza Zabuawala with further hacking by Ashesh Vashi and I.
2016-03-08 15:48:11 +00:00
Dave Page
5ea822f33e Preferences dialogue. Patch by Ashesh and Khushboo Vashi. 2016-03-07 11:48:53 +00:00
Ashesh Vashi
cc08708f23 Allow to specify special type - 'group' in schema for the browser node,
which allows to determine certain group to hide/show the whole
tab/fieldset control in the properties, and create dialog.

Using this functionality in the database for the
'default privileges - types', which is not allowed before PG < 9.2 using
the version check.
2016-03-06 18:50:10 +05:30
Sanket Mehta
a4e819c68c Fix an error retrieving dependents and dependencies for casts. 2016-03-04 11:03:30 +00:00
Harshal Dhumal
d2e372114b Security Label and ACL template macros:
Way to use in template:

1) Security labels:

SECLABLE.SET(conn, object_type, object_name, provider, security_label,
object.schema)

SECLABLE.UNSET(conn, object_type, object_name, provider, object.schema)

2) Privileges:

PRIVILEGE.SET(conn, object_type, grantee, object_name,
privileges_without_grant, privileges_with_grant,
            object.schema)

PRIVILEGE.UNSETALL(conn, object_type, grantee, object_name, schema)

privileges_without_grant = comma separated string of privileges.
privileges_with_grant = comma separated string of privileges.
2016-03-03 15:12:37 +00:00
Khushboo Vashi
3ff06da772 Security Labels, Privileges and Variables macros for the functions modules.
Usage of the macros:

Security labels:

SECLABLE.SET(conn, 'FUNCTION', func_name, provider, security_label, func_schema, func_args)

SECLABLE.UNSET(conn, 'FUNCTION', func_name, provider, func_schema, func_args)

Privileges:

PRIVILEGE.SET(conn, 'FUNCTION', grantee, func_name, privileges_without_grant, privileges_with_grant, func_schema, func_args)

PRIVILEGE.UNSETALL(conn, 'FUNCTION', grantee, func_name, func_schema, func_args)

Variables:

VARIABLES.SET(conn, 'FUNCTION', func_name, options, func_schema, func_args)

VARIABLES.UNSET(conn, 'FUNCTION', func_name, options, func_schema, func_args)
2016-03-03 14:08:28 +00:00
Ashesh Vashi
b41066a6b6 [Reversed Engineered SQL] Security Labels is not available for PostgreSQL <= 9.1 2016-03-01 15:36:52 +05:30
Ashesh Vashi
cf170821cb Security Labels is not available for PostgreSQL <= 9.1 2016-03-01 11:06:31 +05:30
Ashesh Vashi
1cb2a054ff Showing consitent reversed engineered SQL for the database node. 2016-03-01 10:42:04 +05:30
Ashesh Vashi
54edb4b482 Resolved a typo in variable name in the database/utils.py 2016-02-29 10:44:57 +05:30
Khushboo Vashi
d4a13eaafa Security Labels and the Variables are used in many modules under the Database Node.
Provide functions in the database node to handle them.
2016-02-26 15:21:55 +00:00
Dave Page
3b2ef2961b Correct error message to match the field name. 2016-02-25 16:47:07 +00:00
Dave Page
af25a11dde Correct spelling of SECLABEL 2016-02-25 16:41:11 +00:00
Dave Page
de9e122a91 Fix typo 2016-02-25 10:39:04 +00:00
Surinder Kumar
c950683fa1 Add support for extensions. 2016-02-24 16:45:35 +00:00
Sanket Mehta
f466e0169a Add support for casts. 2016-02-24 16:44:37 +00:00
Ashesh Vashi
f4ae7cd210 Resolved a typo in the node creation SQL template for PostgreSQL 9.2. 2016-02-24 15:00:25 +05:30
Akshay Joshi
7ffbb8c039 Add support for viewing/editing procedural languages. 2016-02-23 10:07:14 +00:00
Akshay Joshi
c153032e3b Add support for displaying dependency and dependents info. 2016-02-22 13:07:16 +00:00
Ashesh Vashi
d5da26876b Resolved few issues (with some improvements) with existing nodes.
This commit takes care of the following issues/improvements.
* Adding missing imports for unauthorised in database module
* Node under Servers Nodes (i.e. Databases, tablespaces, roles nodes)
  need to be inherited from PGChildNodeView (and, not from NodeView) for
  adding server version check for their children.
* Adding statistics for database, and tablespaces in its node (not, yet
  in UI)
* Renaming the camel case methods with proper name.
  (i.e. getSQL -> get_sql, getNewSQL -> get_new_sql, etc.)
* Fixed the functions going beyond the text limit (column: 80) in
  Databases, Roles & Tablespaces modules.
* Fixed the node method of Database module, which was not tested ever.
* We do not need separate SQL template for fetching the name (i.e.
  get_name.sql), using the 'nodes.sql' for the same.
* Optimise the query for fetching ACLs for the database node, we didn't
  require to join certain tables, while fetching only the ACLs.
* Introduced the list of the ACLs (regular and default ACLs for
  different type) supported by each version [Databases Module].
* Renamed the templates 'get_nodes.sql' to' nodes.sql' to make it
  consistent with other modules.
* Removed the checks for the authentication table use, as we don't need
  to expose the password to the users (even the encrypted MD5). Using
  the pg_roles view always for fetching roles/users information now.
* Resolved some typos in unreachable (specially the exceptions
  catchment area.)
* Logging the exception in the application.
* Using qtLiteral, qtIdent properly in the templates (do not assume
  about the types of data.)
* Using tsid as identifier instead of did for the tablespaces.
* Using nodes method of tablespace view for fetching individual node
  information.
* Removing the hardcoded node information from the 'parse_priv_to_db'
  function, and pass on allowed ACLs by the caller nodes.
* Using 'nodes.sql' to fetch name of the template instead of writing
  that in the delete.sql template, which is definitely wrong place to
  fetch the name of the object. [Tablespace Module]
2016-02-22 11:44:24 +05:30
Harshal Dhumal
a3d23a65bb Disconnect the database connection only once not every time before
running the offline queries i.e. renaming of the database, using
different tablespce for the database, etc.
2016-02-18 17:08:24 +05:30
Dave Page
131043d7cb Don't ask before connecting to servers or databases, just do it like pgAdmin 3. 2016-02-12 16:46:56 +00:00
Ashesh Vashi
712f47987f Resolving an error related to not able to generate the reversed
engineered SQL from the database when no ACL is defined.
2016-02-05 17:29:04 +05:30
Ashesh Vashi
657f14997b Adding the Database node.
We know that current implemenation have some limitations:
i.e.
* We should not show the template0 in the browser tree.
* Should not connect to the database which does not have permission to connect the server by the current user.
* Show default previlige for PUBLIC in creation mode.
* Allow to create/database database only if current user have sufficient permission.
* Do not show reversed engineered SQL in all supported version.
* Do not showing system database or not.

Author: Khushboo Vashi, Harshal Dhumal, Murtuza Zabuawala
Reviewed by: Neel Patel, Akshay Joshi
2016-02-05 13:06:50 +05:30