[pgAdmin4][PATCH] Fix trigger's reversed engineered SQL for View

2017-08-18 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix the issue where view is not fully qualified in
Trigger definition.
RM#2560

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

[image: https://community.postgresrocks.net/]

diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
index 17a7df6..30d8dd9 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
@@ -901,6 +901,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
 # data.table and not data.relname so compatibility add new key as
 # table in res_rows.
 res_rows['table'] = res_rows['relname']
+res_rows['schema'] = self.view_schema
 
 # Get trigger function with its schema name
 SQL = render_template("/".join([self.trigger_temp_path,
@@ -999,6 +1000,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
 
 # merging formated result with main result again
 result.update(frmtd_reslt)
+self.view_schema = result.get('schema')
 
 # Fetch all privileges for view
 SQL = render_template("/".join(


Re: pgAdmin4: Random failure of FTS test cases due to improper random string creation

2017-08-18 Thread Dave Page
On Fri, Aug 18, 2017 at 4:54 AM, Ashesh Vashi  wrote:

> On Fri, Aug 11, 2017 at 1:24 PM, Navnath Gadakh <
> navnath.gad...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find the attached patch for UUID creation issues with test
>> objects for FTS configurations, FTS dictionaries and FTS parsers.
>> Previously(refer email with subject "Build failed in Jenkins:
>> pgadmin4-master-python27 #279" and "Build failed in Jenkins:
>> pgadmin4-master-python33 #207"), test cases were randomly failing due to
>> repetitions of the test object names.
>>
>> In the old code we used some part of the string for creating a UUID
>> string, but it seems that at some point that created string gets repeated
>> and due to which test cases were failing as this was a random behavior, now
>> it is fixed.
>>
> Navnath,
>
> We're still not removing the temporary objects, created by test-cases, in
> the tear-down function.
> We should have removed them in the tear-down function to fix the issue in
> proper way.
>
> Dave - thoughts?
>

Right - it only seems to be FTS and FDW related objects that suffer from
this problem from what I can see, so I assume we're getting it right for
everything else by removing objects in the tear-down.

-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


Re: [pgadmin4][Patch] Greenplum specific DDL and Dashboard display

2017-08-18 Thread Dave Cramer
Hi Violet.

I don't really like the way this has been implemented. It adds a variable
which is only used for gpdb.

There are other places in the code where the behaviour is changed if the
server is ppas or regular postgres.

Candidly I think all of this needs restructuring.

Dave Cramer

On 15 August 2017 at 23:29, Violet Cheng  wrote:

> Hi,
>
> Any comment on this patch? If no, will it be committed soon?
>
> Thanks,
> Violet
>
> On Wed, Aug 9, 2017 at 12:05 PM, Sarah McAlear 
> wrote:
>
>> Hi Hackers!
>>
>> This patch enables Greenplum users to see the same charts on the
>> dashboard as postgres users. It also adds some additional information to
>> the DDL that is Greenplum specific and necessary to create a new table.
>>
>> Thanks!
>> Sarah
>>
>>
>>
>