Commit Graph

236 Commits

Author SHA1 Message Date
Akshay Joshi
76fb831554 Fixed issue where some parameter like 'Volatility, LeakProof , Variables etc..' not visible in SQL definition for functions and trigger functions. 2016-10-20 19:07:51 +05:30
Dan Vianello
6c5d81b6f5 Fixes #1843 Function definition does not match value returned from pg_get_functiondef() 2016-10-20 18:30:43 +05:30
Priyanka Shendge
c4f1b8eb11 Add tests for Languages 2016-10-18 14:36:25 +01:00
Dave Page
8d2dff1482 Always create databases from template0 when running regression tests, to ensure consistency and avoid concurrency issues. 2016-10-18 11:57:31 +01:00
Surinder Kumar
11e486f96d Fix unsafe schema lookups for types. Fixes #1728 2016-10-18 11:32:43 +01:00
Surinder Kumar
dd6a69d845 Handle reverse engineering of synonyms with / in the name. Fixes #1622 2016-10-14 16:01:55 -07:00
Akshay Joshi
2d39b5fb41 Identify the collation correctly when reverse engineering table SQL. Fixes #1847 2016-10-14 15:57:55 -07:00
Surinder Kumar
c7520cf86d Allow refreshing of synonym nodes. Fixes #1845 2016-10-14 15:50:20 -07:00
Surinder Kumar
17bd379cb6 Properly quote names when renaming FTS dictionaries and templates. Fixes #1857 2016-10-14 12:23:10 -07:00
Surinder Kumar
0df968f679 Resolve issue with properties refreshing. Fixes #1728
1) If we create/update a node with non-default schema, It should return selected schema id in return response. but default schema id is returned every time due to which it throws error in properties panel.
Fixed in Domains, Collation, Types, Views & Table node.

2) Incorrect parent id of object node is returned from nodes method due to which wrong parent id is passed while updating object and
thus node didn't get refreshed.
Fixed in FTS Configuration, FTS Parser nodes.
2016-10-14 12:19:00 -07:00
Navnath Gadakh
404d4efd2e Add test cases for tables, types, views and their children. 2016-10-14 11:20:51 -07:00
Priyanka Shendge
22dadacb0f Add terst cases for packages, and update Synonym cases for recent API changes. 2016-10-14 10:59:36 -07:00
Priyanka Shendge
540c389d92 Add regression tests for Foreignb Tables. 2016-10-13 06:57:16 -07:00
Priyanka Shendge
8b91babdc2 Add regression tests for FTS nodes. 2016-10-13 06:54:23 -07:00
Harshal Dhumal
713c692ddd Fix View privilege management. Fixes #1531
1. Fixed update privileges for views and materialized views.
2. Apart from this fixed wrong sql for privilege update.
3. Fixed: Error message was not got cleared even after removing entry with error on privilege tab.
2016-10-10 09:42:22 +01:00
Navnath Gadakh
ae612f5403 Major update to the test suite:
1. Code changes (due to drop objects functionality).
2. Quoting for database names in drop databases.
3. Code changes for import errors for pickle_path and advanced_config variables.
2016-10-07 13:59:43 +01:00
Murtuza Zabuawala
c931d715ac Fix refresh of Synonyms. Fixes #1611 2016-10-07 12:08:19 +01:00
Dave Page
a91f19a21d Fix typo. Fixes #1596 2016-09-30 10:36:39 +01:00
Dave Page
49ee8abb72 Fix typo 2016-09-30 09:45:14 +01:00
Dave Page
f9dacc5237 Fix label cpaitalisation 2016-09-26 15:04:47 +01:00
Ashesh Vashi
912eebb583 Fix view creation. Fixes #1736 2016-09-26 11:00:18 +01:00
Dave Page
f51d8c72ef Fix validation message 2016-09-26 10:57:16 +01:00
Ashesh Vashi
6999249dcd Ensure the default schema is set when creating objects. Fixes #1735 2016-09-26 10:15:23 +01:00
Ashesh Vashi
1c623c56e7 Fixes#1737 - Setting the schedma-id as the pid (parent-id) for the
sequences node instead of the server-id.

Due to this - during updating the sequence node, it was not able to find
out the correct parent node, and it was updating the existing node, but
- later it (considering the old node) was removed by the replace logic.
2016-09-24 14:25:16 +05:30
Murtuza Zabuawala
a113b43a1f Add Packages as a synonym target type. Fixes #1611 2016-09-22 14:56:00 +01:00
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