Commit Graph

211 Commits

Author SHA1 Message Date
Navnath Gadakh
1cb5a7c7ca Update regression tests to resolve issues where database/connections were getting mixed up. 2016-09-22 12:58:38 +01:00
Navnath Gadakh
c84fd83595 Enhanced summary output for the test suite. 2016-09-19 16:49:06 +01:00
Murtuza Zabuawala
2440f89a71 Fix an issue where the edit icon vanished and the default tab wasn't shown when advanced-editing a column in the table dialogue. Fixes #1704 2016-09-19 15:37:04 +01:00
Surinder Kumar
cc0cb83277 Resolve a syntax error when updating packages with no body. Fixes #1588 2016-09-19 15:33:19 +01:00
Murtuza Zabuawala
82d63804c1 Resolve a refresh issue when updating packages. Fixes #1625 2016-09-19 09:41:13 +01:00
Murtuza Zabuawala
fc5ce22de9 Allow creation of objects in schemas with special chars in the name. Fixes #1598
This was caused through generation of SQL based on HTML-escaped labels, not the raw versions.
2016-09-16 17:02:57 +01:00
Murtuza Zabuawala
c5f04d03c6 Fix an issue where several default privileges cause error on database. Fixes #1670 2016-09-16 16:06:29 +01:00
Surinder Kumar
92bc312d2d Fix updating of matview definitions. Fixes #1595 2016-09-16 15:41:07 +01:00
Magnus Hagander
ce20dbc25a Add classid filter to queries on pg_depend. Fixes #1705
There are a number of cases where queries in both pgadmin4 and pgadmin3 are done against pg_depend but falis to constrain the query on classid.

In particular, if for example a constraint and a sequence exists with the same oid (which is perfectly valid, as they are in different tables), a column will suddenly refer sequences that are completely incorrect. When we look up sequences, we have to make sure we only match dependencies against pg_class.
2016-09-16 11:24:54 +01:00
Surinder Kumar
165b93a968 Fix a syntax error when creating a trigger function on PPAS 9.5+. Fixes #1600 2016-09-16 11:12:41 +01:00
Surinder Kumar
1ce5b38f4a Fix an issue when changing the length of a column in the table dialogue. Fixes #1669 2016-09-16 11:09:13 +01:00
Ashesh Vashi
c48e8d415b The Switch Dependency Cell, implemented in schema module, has a special
case. Its purpose is now to handle certain scinarios specific to table
children modules.

Renamed it to 'TableChildSwitchCell' from 'SwitchDepCell' to avoid any
conflict in future.
2016-09-15 13:36:56 +05:30
Navnath Gadakh
d3d8836f61 Introduce a test config database for the regression tests, and track/remove objects that are created during testing. 2016-09-14 16:26:12 +01:00
Surinder Kumar
2ee631d6fc Remove blank lines in the formatting of SELECT scripts for functions. Fixes #1690 2016-09-14 11:08:10 +01:00
Surinder Kumar
f2469d113c Fix function signature generation for reverse engineered SQL. Fixes #1674
1) In SQL pane, the signature in comments had arguments with name and type, Now it will show arguments with type only.

2) There is no indent+newline between arguments (there isn't even a space). - Fixed

3) The default value for the last argument is omitted. - Fixed
Last argument is omitted because the value for the last argument we got from table is empty.
Now we form function signature in the get_definition.sql using 'pg_catalog.pg_get_function_arguments' method.

Above changes will reflect in Functions, Procedures & Trigger function Nodes.
2016-09-14 10:59:11 +01:00
Murtuza Zabuawala
046f6dd442 Fix creation of DO INSTEAD rules. Fixes #1681 2016-09-14 10:39:16 +01:00
Murtuza Zabuawala
071b609a44 Fix error when refreshing table node. Fixes #1686 2016-09-14 10:30:02 +01:00
Surinder Kumar
f2ed6fa4dd Fix function signature generation. Fixes #1683 2016-09-12 15:20:46 +01:00
Surinder Kumar
28b7a033bc Prevent creation of packages and rules in catalogs. Fixes #1682 2016-09-12 11:37:25 +01:00
Murtuza Zabuawala
35d3c396de Fix SQL generation for functions that return SETOF ... Fixes #1631 2016-09-07 14:53:22 +01:00
Murtuza Zabuawala
689ef8d8d1 Fixes issues specific to SYNONYMS
- On droping a synonyms - the query should be modified in SQL pane.
- A proper message should be given on trying to drop an already dropped
  synonyms.
- Handle the synonyms with special characters.

Fixes #1607, #1608, #1609
2016-08-29 20:25:18 +05:30
Ashesh Vashi
b6f307256b Sorting the data during tree data loading using the natural sort
algorithm.

This patch takes care of:
* Consistent behaviour during create, update operation on any node.
  - It should return the node data during creating a new object, or
    updating the existing one.
* Now that - we have consistent behaviour during these operations, we
  can consistently move, update the tree item based the node data from
  the server.
* Implemented the methods for each node to get the information about
  that particular node only.
* Using the above changes to implement the 'refresh' operation on tree
  node properly.

I must thank Surinder, and Harshal for helping me implement the 'node'
method, and also changed the behaviour of create & update methods to
return the node data for most of the nodes.

Fixes #1244
2016-08-29 20:06:58 +05:30
Ashesh Vashi
f12d981a9d Handling the bad/lost connection of a database server.
Made backend changes for:
* Taking care of the connection status in the psycopg2 driver. And, when
  the connection is lost, it throws a exception with 503 http status
  message, and connection lost information in it.
* Allowing the flask application to propagate the exceptions even in the
  release mode.
* Utilising the existing password (while reconnection, if not
  disconnected explicitly).
* Introduced a new ajax response message 'service_unavailable' (http
  status code: 503), which suggests temporary service unavailable.

Client (front-end) changes:
* To handle the connection lost of a database server for different
  operations by generating proper events, and handle them properly.

Removed the connection status check code from different nodes, so that
- it generates the proper exception, when accessing the non-alive
  connection.

Fixes #1387
2016-08-29 12:01:35 +05:30
Murtuza Zabuawala
5a78dd7ad3 Implemented Synonym node for EPAS 2016-08-26 13:01:57 +05:30
Akshay Joshi
7b72448ec9 Internal sever error displayed if create New user mapping with public user. Fixes #1468 2016-08-26 11:23:15 +05:30
Murtuza Zabuawala
05473a7a35 domain node: id and pid is not being generated. Fixes #1586 2016-08-25 14:07:04 +05:30
Akshay Joshi
e016869ad5 Trigger issues through right click. Fixes #1209 2016-08-24 12:10:54 +05:30
Priyanka Shendge
a535eddfcd Add schema and database child node regression tests. 2016-08-23 11:50:41 +01:00
Harshal Dhumal
58a79e4fc6 Fix parsing issue in packages. 2016-08-22 16:49:32 +01:00
Harshal Dhumal
cf1be2a320 Add support for Packages on EPAS. 2016-08-22 12:30:16 +01:00
Surinder Kumar
4c2020cdc7 Allow the use of the tab key to select options in combo boxes. Fixes #1251 2016-08-22 12:18:38 +01:00
Surinder Kumar
5690dfda16 Allow template databases to be used when creating new databases. Fixes #1570 2016-08-19 16:35:42 +01:00
Akshay Joshi
7dffb020f1 Support CREATE LANGUAGE. Fixes #1252 2016-08-19 10:26:02 +01:00
Murtuza Zabuawala
8e0a61f556 Fixed typo in security labels macro Fixes #1457 2016-08-18 18:03:30 +05:30
Harshal Dhumal
1056e9553f Show default database privileges in properties mode. Fixes #1538 2016-08-17 14:22:56 +01:00
Murtuza Zabuawala
9ec05d6bb1 Fix an issue where system level catalog are also displayed in PPAS server under relation of create new table like option. Fixes #1530 2016-08-16 16:29:50 +01:00
Murtuza Zabuawala
c336e8a743 Fix an issue in foreign tables node where it was displaying catalog tables in inherits options causing internal server error. Fixes RM#1520 2016-08-16 15:44:44 +01:00
Dave Page
99b4a0fe5b Add unit tests for schemas, collations and trigger functions. 2016-08-16 12:54:02 +01:00
Surinder Kumar
67f481ab11 Prevent creation of FTS objects in catalogs. Fixes #1122 2016-08-16 12:49:19 +01:00
Navnath Gadakh
81e2bc1e80 Test suite enhancements:
1. The user will specify the tablespace path in test_config.json.in
2.  If tablespace path not found, skip the test cases for that server(Only tablespace test cases)
3.  Add the skipped test summary in the test result. (Now it's showing on console + in log file, but need to update in a final enhanced test summary report. Which is research point we will work on that after finishing all nodes API test cases)
4.  Removed the test_ prefix from the values in the config files.
5. Add tablespace and roles tests
2016-08-09 16:05:40 +01:00
Surinder Kumar
5900848842 Sequence related validation/fixes. Fixes #1119
1) Add proper validation checks for fields.
2) Fixed wrong sql generation due to incorrect conditions in template.
2016-08-08 12:47:20 +01:00
Surinder Kumar
7cf4ac2474 Fix RE-SQL for Trigger Functions which was missing an 'AS'. Fixes #1524 2016-08-08 12:17:54 +01:00
Khushboo Vashi
b00e94e904 Fix drop trigger function, function and procedures. Fixes #1467 2016-08-04 15:24:03 +01:00
Khushboo Vashi
68497b00f6 Fix dropping of Domains. Fixes #1470 2016-08-03 15:44:24 +01:00
Harshal Dhumal
de568b3021 Fix renaming of constraints from the table dialogue. Fixes #1500
1] datamodel.js: For collection type added check before adding model into "changed" list instead of adding it blindly.

2] Type casting from str to int of column properties like attlen, attpricision.

3] Added missing data formating when adding new column to existing table (from table edit mode).

4] Added more validation for Foreign key constraint.

5] Column.js: Column grid (in table edit mode) show proper disabled color for disabled cell when grid renders.

6] All constraints and index js added idattribute to distinguish which s/constraint or s/index is updated on server side.

7] Column update.sql: Fixed sql when altering column data type. The issue was when we alter data type from which has length and precision to data type which don't have these properties and vice versa.
For e.g. alter data type numeric(10,12) to real (and vice versa)

8] Renaming constraint (RM1500).

9] simplejson KeyError handing for Python 2.7.
2016-08-03 15:39:14 +01:00
Harshal Dhumal
ec3b9bb15b Allow to create the foreign table with inherits options. Fixes #1260 2016-08-02 09:38:56 +05:30
Murtuza Zabuawala
01252a13cf Further misc quoting/encoding related fixes. 2016-08-01 15:23:06 +01:00
Dave Page
16304aafd2 s/buttton/button/g, per Anthony DeBarros. Fixes #1518 2016-08-01 15:16:14 +01:00
Navnath Gadakh
5c3c543d2e Test suite improvements:
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and  PPAS are included in both .in files.

- Removed the logic of logging in  the test client on each test scenario(As per Khushboo's comment in previous email).  We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and  invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
2016-07-27 15:33:36 +01:00
Murtuza Zabuawala
b6e8d195dc Security label providers are an optional parameter. Fixes #1478. 2016-07-27 15:01:16 +01:00