Re: [pgadmin-hackers] fix for RM1210 [pgadmin4]

2016-06-03 Thread Ashesh Vashi
On Fri, Jun 3, 2016 at 1:13 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> I have used 'ajax_response' utility function (alias to make_response
> pdadmin utility function) which has mime-type set to "text/json" which is
> correct I guess in this case.
>
> Also I have check all other node to check if all of them are using correct
> function while returning sql.
>
Ok.
Thanks - committed!


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Jun 3, 2016 at 1:04 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Fri, Jun 3, 2016 at 12:59 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Issue: For column node it was showing wrong sql in sql tab
>>>
>>> -- Column: public.test_qmg.a -- ALTER TABLE
>>> public.test_qmg DROP COLUMN a; ALTER TABLE public.test_qmg ADD COLUMN a
>>> integer;
>>>
>>> Fix: I have changed response to ajax response while returning SQL for
>>> column node.
>>>
>> Hi Harshal,
>>
>> Can you please introduce a function in pgadmin.utils regarding that,
>> which set the proper mime-type for this purpose, and make sure - we do use
>> that for each and every nodes, for sql and modified_sql methods?
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Fri, Jun 3, 2016 at 12:52 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 Hi Harshal,


 Can you please describe the issue, and root cause, and how did you fix
 it?

 --

 Thanks & Regards,

 Ashesh Vashi
 EnterpriseDB INDIA: Enterprise PostgreSQL Company
 


 *http://www.linkedin.com/in/asheshvashi*
 

 On Fri, Jun 3, 2016 at 12:48 PM, Harshal Dhumal <
 harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for RM1210 
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>

>>>
>>
>


Re: [pgadmin-hackers] fix for RM1210 [pgadmin4]

2016-06-03 Thread Harshal Dhumal
Hi Ashesh,

I have used 'ajax_response' utility function (alias to make_response
pdadmin utility function) which has mime-type set to "text/json" which is
correct I guess in this case.

Also I have check all other node to check if all of them are using correct
function while returning sql.



-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Jun 3, 2016 at 1:04 PM, Ashesh Vashi 
wrote:

> On Fri, Jun 3, 2016 at 12:59 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Issue: For column node it was showing wrong sql in sql tab
>>
>> -- Column: public.test_qmg.a -- ALTER TABLE
>> public.test_qmg DROP COLUMN a; ALTER TABLE public.test_qmg ADD COLUMN a
>> integer;
>>
>> Fix: I have changed response to ajax response while returning SQL for
>> column node.
>>
> Hi Harshal,
>
> Can you please introduce a function in pgadmin.utils regarding that, which
> set the proper mime-type for this purpose, and make sure - we do use that
> for each and every nodes, for sql and modified_sql methods?
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>>
>>
>>
>>
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Fri, Jun 3, 2016 at 12:52 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> Hi Harshal,
>>>
>>>
>>> Can you please describe the issue, and root cause, and how did you fix
>>> it?
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> 
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi*
>>> 
>>>
>>> On Fri, Jun 3, 2016 at 12:48 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA patch for RM1210 

 --
 *Harshal Dhumal*
 *Software Engineer*

 EnterpriseDB India: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company


 --
 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgadmin-hackers


>>>
>>
>


Re: [pgadmin-hackers] fix for RM1210 [pgadmin4]

2016-06-03 Thread Ashesh Vashi
On Fri, Jun 3, 2016 at 12:59 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Issue: For column node it was showing wrong sql in sql tab
>
> -- Column: public.test_qmg.a -- ALTER TABLE
> public.test_qmg DROP COLUMN a; ALTER TABLE public.test_qmg ADD COLUMN a
> integer;
>
> Fix: I have changed response to ajax response while returning SQL for
> column node.
>
Hi Harshal,

Can you please introduce a function in pgadmin.utils regarding that, which
set the proper mime-type for this purpose, and make sure - we do use that
for each and every nodes, for sql and modified_sql methods?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


>
>
>
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Jun 3, 2016 at 12:52 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Hi Harshal,
>>
>>
>> Can you please describe the issue, and root cause, and how did you fix it?
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>> On Fri, Jun 3, 2016 at 12:48 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch for RM1210 
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>


Re: [pgadmin-hackers] fix for RM1210 [pgadmin4]

2016-06-03 Thread Harshal Dhumal
Hi,

Issue: For column node it was showing wrong sql in sql tab

-- Column: public.test_qmg.a -- ALTER TABLE
public.test_qmg DROP COLUMN a; ALTER TABLE public.test_qmg ADD COLUMN a
integer;

Fix: I have changed response to ajax response while returning SQL for
column node.






-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Jun 3, 2016 at 12:52 PM, Ashesh Vashi  wrote:

> Hi Harshal,
>
>
> Can you please describe the issue, and root cause, and how did you fix it?
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
> On Fri, Jun 3, 2016 at 12:48 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch for RM1210 
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>


Re: [pgadmin-hackers] fix for RM1210 [pgadmin4]

2016-06-03 Thread Ashesh Vashi
Hi Harshal,


Can you please describe the issue, and root cause, and how did you fix it?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Fri, Jun 3, 2016 at 12:48 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for RM1210 
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] fix for RM1210 [pgadmin4]

2016-06-03 Thread Harshal Dhumal
Hi,

PFA patch for RM1210 

-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/__init__.py
index 5bcb456..6e77b2e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/__init__.py
@@ -820,7 +820,7 @@ class ColumnsView(PGChildNodeView, DataTypeReader):
   data=data, conn=self.conn)
 SQL = sql_header + '\n\n' + SQL
 
-return SQL
+return ajax_response(response=SQL.strip('\n'))
 
 except Exception as e:
 return internal_server_error(errormsg=str(e))

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers