[pgadmin-hackers] pgAdmin 4 commit: [Python 3] Fixed the issue loading the value for the

2016-03-23 Thread Ashesh Vashi
[Python 3] Fixed the issue loading the value for the session key from the 
sqlite.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=12a0cb1ba1720ecd6c42d519bd9bc7215147504e
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/utils/session.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
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] PATCH: To fix session decoding issue with Python3 [pgAdmin4]

2016-03-23 Thread Ashesh Vashi
Thanks - applied!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Wed, Mar 23, 2016 at 12:11 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix session key decoding issue with Python3 version.
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: 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] pgAdmin 4 commit: Evaluate the disabled option in SwitchControl.

2016-03-23 Thread Ashesh Vashi
Evaluate the disabled option in SwitchControl.

Also - for consistency reason use the same evaluation logic in each of
the control.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=219f208317650b5322eb0fa66951c596c4ab7f74
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)


-- 
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] Disabled option to bootstrap switch control [pgadmin4]

2016-03-23 Thread Ashesh Vashi
On Wed, Mar 23, 2016 at 12:26 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch for switch control.
>
>
> Change: Added disabled option to bootstrap switch control.
>
Committed with small change.
Also - modified the SubnodeControl to use the similar evaluation function.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
>
> --
> 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] pgAdmin4 PATCH: Domain Module

2016-03-23 Thread Khushboo Vashi
Updated one comment.

On Wed, Mar 23, 2016 at 12:48 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached updated patch for the Domains module.
>
> On Wed, Mar 16, 2016 at 9:40 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Wed, Mar 16, 2016 at 2:03 PM, Khushboo Vashi
>>  wrote:
>> > Hi,
>> >
>> > Please find the updated Domain Module Patch.
>> >
>> > To test this patch, please apply Backgrid Textarea Cell Patch before
>> this.
>>
>> Thanks. I believe with the following fixes, we'll be done :-)
>>
>> - Default values should be auto-quoted when necessary (ie. strings, on
>> a text-based domain).
>>
> As per our discussion, this should leave unquoted.
>
And also added a hint to the field stated 'Enter an expression or a value.'

>
> - "System Domain?" should be in the General section, between owner and
>> comment.
>>
> Done
>
>> - The switches should use the same colouring/styling as other objects,
>> e.g.
>>
>>   options: {
>> 'onText': 'Yes', 'offText': 'No',
>> 'onColor': 'success', 'offColor': 'primary',
>> 'size': 'small'
>>   }
>>
> Done
>
>> - Please remove the Schema property from the main properties tab (not
>> the properties dialogue).
>>
> Done
>
>> - No icon is show for Checks on the Dependents tab for a domain.
>>
> Done
>
>> - The add button on the Security Labels tab is spelt "Add". Why is
>> that? Other instances of this grid use "ADD" which is the default in
>> backform.pgadmin.js.
>>
> Done
>
>> - Dependencies on domain check constraints are listed as being on a
>> "Type" not a "Domain".
>>
> Done
>
>> - If adding a domain constraint using the grid on the Domain dialogue,
>> I cannot specify "NOT VALID". We need a checkbox for that in a narrow
>> columns at the end. Unchecking it for an existing constraint should be
>> the equivalent of doing "ALTER DOMAIN ... VALIDATE CONSTRAINT"
>>
> Done
>
>> - If I switch the "Don't Validate" switch on a constraint, there are
>> leading blank lines in the generated SQL. The same occurs when adding
>> a comment to a constraint.
>>
> Done
>
>> - I think we need to reverse the meaning of "Don't Validate" and
>> rename to match the "Valid?" field that's on the properties list.
>> Otherwise it's not clear they're the same thing.
>>
> Done
>
>> - s/Not Null/Not Null?/
>>
> Done
>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Ashesh Vashi
On Tue, Mar 22, 2016 at 8:41 PM, Dave Page  wrote:

> Hi
>
> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Hi Dave/team,
>>
>> As discussed, I have implemented the server side session management using
>> the SQLite database.
>>
>> Implementation:
>> * It creates/reuses the sqlite database per session.
>> * Stores the key (as text)/value (as blob) in the sqlite database.
>> * Needs to provide the session directory, where you want to store those
>> sessions. If this directory does not exist, it creates the directory with
>> 700 permission. (Default: /.pgadmin/sessions directory.)
>> * Also - sets default value for the log file to be stored in the
>> '/.pgadmin' directory. This will allow us to keep separate
>> configuration per user on any operation system, when running through
>> runtime.
>>
>> This implementation uses sqlite as session storage, it may affect because
>> of explicit file system I/O operation. Though - performance should not be a
>> big issue, as we're not targeting to support very huge parallel sessions.
>>
>
> Thanks - applied.
>
Thanks.

>
> I assume it's expected at this point that new connections still fail if
> the backend is restarted (that would come with graceful reconnections)?
>
Hmm..
I did not get that.

Do you mean to say?
- New Connection to the server should not be established (if it was
restarted).
- What about the existing connection, should it re-establish the connection
after the backend restart (when allowed)?


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
>
>> Murtuza,
>>
>> I have tested it on Python 2.7.
>> Can you please take a look at it, and do the needful to make it work on
>> Python 3.x?
>>
>
> Please double-check Windows as well.
>
Thanks - Murtuza for the python 3 support patch.

Neel - can you please take a look at the Windows?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Neel Patel
Hi,

I just tested the latest code under windows environment with python 2.7
which is working fine without any errors.

Thanks,
Neel Patel

On Wed, Mar 23, 2016 at 1:02 PM, Ashesh Vashi  wrote:

> On Tue, Mar 22, 2016 at 8:41 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave/team,
>>>
>>> As discussed, I have implemented the server side session management
>>> using the SQLite database.
>>>
>>> Implementation:
>>> * It creates/reuses the sqlite database per session.
>>> * Stores the key (as text)/value (as blob) in the sqlite database.
>>> * Needs to provide the session directory, where you want to store those
>>> sessions. If this directory does not exist, it creates the directory with
>>> 700 permission. (Default: /.pgadmin/sessions directory.)
>>> * Also - sets default value for the log file to be stored in the
>>> '/.pgadmin' directory. This will allow us to keep separate
>>> configuration per user on any operation system, when running through
>>> runtime.
>>>
>>> This implementation uses sqlite as session storage, it may affect
>>> because of explicit file system I/O operation. Though - performance should
>>> not be a big issue, as we're not targeting to support very huge parallel
>>> sessions.
>>>
>>
>> Thanks - applied.
>>
> Thanks.
>
>>
>> I assume it's expected at this point that new connections still fail if
>> the backend is restarted (that would come with graceful reconnections)?
>>
> Hmm..
> I did not get that.
>
> Do you mean to say?
> - New Connection to the server should not be established (if it was
> restarted).
> - What about the existing connection, should it re-establish the
> connection after the backend restart (when allowed)?
>
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>>
>>> Murtuza,
>>>
>>> I have tested it on Python 2.7.
>>> Can you please take a look at it, and do the needful to make it work on
>>> Python 3.x?
>>>
>>
>> Please double-check Windows as well.
>>
> Thanks - Murtuza for the python 3 support patch.
>
> Neel - can you please take a look at the Windows?
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Ashesh Vashi
On Wed, Mar 23, 2016 at 2:04 PM, Neel Patel 
wrote:

> Hi,
>
> I just tested the latest code under windows environment with python 2.7
> which is working fine without any errors.
>
Thanks.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
> Thanks,
> Neel Patel
>
> On Wed, Mar 23, 2016 at 1:02 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Tue, Mar 22, 2016 at 8:41 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 Hi Dave/team,

 As discussed, I have implemented the server side session management
 using the SQLite database.

 Implementation:
 * It creates/reuses the sqlite database per session.
 * Stores the key (as text)/value (as blob) in the sqlite database.
 * Needs to provide the session directory, where you want to store those
 sessions. If this directory does not exist, it creates the directory with
 700 permission. (Default: /.pgadmin/sessions directory.)
 * Also - sets default value for the log file to be stored in the
 '/.pgadmin' directory. This will allow us to keep separate
 configuration per user on any operation system, when running through
 runtime.

 This implementation uses sqlite as session storage, it may affect
 because of explicit file system I/O operation. Though - performance should
 not be a big issue, as we're not targeting to support very huge parallel
 sessions.

>>>
>>> Thanks - applied.
>>>
>> Thanks.
>>
>>>
>>> I assume it's expected at this point that new connections still fail if
>>> the backend is restarted (that would come with graceful reconnections)?
>>>
>> Hmm..
>> I did not get that.
>>
>> Do you mean to say?
>> - New Connection to the server should not be established (if it was
>> restarted).
>> - What about the existing connection, should it re-establish the
>> connection after the backend restart (when allowed)?
>>
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
>>>
 Murtuza,

 I have tested it on Python 2.7.
 Can you please take a look at it, and do the needful to make it work on
 Python 3.x?

>>>
>>> Please double-check Windows as well.
>>>
>> Thanks - Murtuza for the python 3 support patch.
>>
>> Neel - can you please take a look at the Windows?
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
>>> Thanks.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Dave Page
On Wed, Mar 23, 2016 at 7:32 AM, Ashesh Vashi  wrote:

> On Tue, Mar 22, 2016 at 8:41 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave/team,
>>>
>>> As discussed, I have implemented the server side session management
>>> using the SQLite database.
>>>
>>> Implementation:
>>> * It creates/reuses the sqlite database per session.
>>> * Stores the key (as text)/value (as blob) in the sqlite database.
>>> * Needs to provide the session directory, where you want to store those
>>> sessions. If this directory does not exist, it creates the directory with
>>> 700 permission. (Default: /.pgadmin/sessions directory.)
>>> * Also - sets default value for the log file to be stored in the
>>> '/.pgadmin' directory. This will allow us to keep separate
>>> configuration per user on any operation system, when running through
>>> runtime.
>>>
>>> This implementation uses sqlite as session storage, it may affect
>>> because of explicit file system I/O operation. Though - performance should
>>> not be a big issue, as we're not targeting to support very huge parallel
>>> sessions.
>>>
>>
>> Thanks - applied.
>>
> Thanks.
>
>>
>> I assume it's expected at this point that new connections still fail if
>> the backend is restarted (that would come with graceful reconnections)?
>>
> Hmm..
> I did not get that.
>
> Do you mean to say?
> - New Connection to the server should not be established (if it was
> restarted).
> - What about the existing connection, should it re-establish the
> connection after the backend restart (when allowed)?
>

There are still some cases, even with the graceful reconnection patch,
where reconnections don't happen and you get a red alert message on the UI.
I've yet to figure out exactly what they are though - but I think whether
the pgAdmin server or the Python server has restarted or dropped
connections, they should gracefully be re-established.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Magnus Hagander
On Tue, Mar 22, 2016 at 4:11 PM, Dave Page  wrote:

> Hi
>
> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Hi Dave/team,
>>
>> As discussed, I have implemented the server side session management using
>> the SQLite database.
>>
>> Implementation:
>> * It creates/reuses the sqlite database per session.
>> * Stores the key (as text)/value (as blob) in the sqlite database.
>> * Needs to provide the session directory, where you want to store those
>> sessions. If this directory does not exist, it creates the directory with
>> 700 permission. (Default: /.pgadmin/sessions directory.)
>> * Also - sets default value for the log file to be stored in the
>> '/.pgadmin' directory. This will allow us to keep separate
>> configuration per user on any operation system, when running through
>> runtime.
>>
>> This implementation uses sqlite as session storage, it may affect because
>> of explicit file system I/O operation. Though - performance should not be a
>> big issue, as we're not targeting to support very huge parallel sessions.
>>
>
> Thanks - applied.
>
> I assume it's expected at this point that new connections still fail if
> the backend is restarted (that would come with graceful reconnections)?
>
>


Heh, does this actually make sqlite a dependency for pgadmin4? That's kind
of hilarious :)

Not saying it's wrong, absolutely not. Just expect a few laughs coming off
that one :D


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Ashesh Vashi
On Wed, Mar 23, 2016 at 2:34 PM, Magnus Hagander 
wrote:

>
>
> On Tue, Mar 22, 2016 at 4:11 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave/team,
>>>
>>> As discussed, I have implemented the server side session management
>>> using the SQLite database.
>>>
>>> Implementation:
>>> * It creates/reuses the sqlite database per session.
>>> * Stores the key (as text)/value (as blob) in the sqlite database.
>>> * Needs to provide the session directory, where you want to store those
>>> sessions. If this directory does not exist, it creates the directory with
>>> 700 permission. (Default: /.pgadmin/sessions directory.)
>>> * Also - sets default value for the log file to be stored in the
>>> '/.pgadmin' directory. This will allow us to keep separate
>>> configuration per user on any operation system, when running through
>>> runtime.
>>>
>>> This implementation uses sqlite as session storage, it may affect
>>> because of explicit file system I/O operation. Though - performance should
>>> not be a big issue, as we're not targeting to support very huge parallel
>>> sessions.
>>>
>>
>> Thanks - applied.
>>
>> I assume it's expected at this point that new connections still fail if
>> the backend is restarted (that would come with graceful reconnections)?
>>
>>
>
>
> Heh, does this actually make sqlite a dependency for pgadmin4? That's kind
> of hilarious :)
>
:)

We're already using sqlite for saving the local configurations instead of
flat file, which caused a lot of problem in past with pgAdmin 3.

>
> Not saying it's wrong, absolutely not. Just expect a few laughs coming off
> that one :D
>

Do not have time to implement another database. :P

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
>
> --
>  Magnus Hagander
>  Me: http://www.hagander.net/
>  Work: http://www.redpill-linpro.com/
>


Re: [pgadmin-hackers] Server side session management using the SQLite (per session) database

2016-03-23 Thread Dave Page
On Wed, Mar 23, 2016 at 9:04 AM, Magnus Hagander  wrote:
>
>
> On Tue, Mar 22, 2016 at 4:11 PM, Dave Page  wrote:
>>
>> Hi
>>
>> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi
>>  wrote:
>>>
>>> Hi Dave/team,
>>>
>>> As discussed, I have implemented the server side session management using
>>> the SQLite database.
>>>
>>> Implementation:
>>> * It creates/reuses the sqlite database per session.
>>> * Stores the key (as text)/value (as blob) in the sqlite database.
>>> * Needs to provide the session directory, where you want to store those
>>> sessions. If this directory does not exist, it creates the directory with
>>> 700 permission. (Default: /.pgadmin/sessions directory.)
>>> * Also - sets default value for the log file to be stored in the
>>> '/.pgadmin' directory. This will allow us to keep separate
>>> configuration per user on any operation system, when running through
>>> runtime.
>>>
>>> This implementation uses sqlite as session storage, it may affect because
>>> of explicit file system I/O operation. Though - performance should not be a
>>> big issue, as we're not targeting to support very huge parallel sessions.
>>
>>
>> Thanks - applied.
>>
>> I assume it's expected at this point that new connections still fail if
>> the backend is restarted (that would come with graceful reconnections)?
>>
>
>
>
> Heh, does this actually make sqlite a dependency for pgadmin4? That's kind
> of hilarious :)

It's actually been there for ages - we just now store session info in
it as well as config settings.

> Not saying it's wrong, absolutely not. Just expect a few laughs coming off
> that one :D

I'm aware of the irony :-). It's a perfectly fine embedded database
though, and that's what we needed here. Running a Postgres instance
for this is severe overkill - but I don't need to explain that to you.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: 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] Server side session management using the SQLite (per session) database

2016-03-23 Thread Magnus Hagander
On Wed, Mar 23, 2016 at 10:15 AM, Dave Page  wrote:

> On Wed, Mar 23, 2016 at 9:04 AM, Magnus Hagander 
> wrote:
> >
> >
> > On Tue, Mar 22, 2016 at 4:11 PM, Dave Page  wrote:
> >>
> >> Hi
> >>
> >> On Thu, Mar 17, 2016 at 5:46 PM, Ashesh Vashi
> >>  wrote:
> >>>
> >>> Hi Dave/team,
> >>>
> >>> As discussed, I have implemented the server side session management
> using
> >>> the SQLite database.
> >>>
> >>> Implementation:
> >>> * It creates/reuses the sqlite database per session.
> >>> * Stores the key (as text)/value (as blob) in the sqlite database.
> >>> * Needs to provide the session directory, where you want to store those
> >>> sessions. If this directory does not exist, it creates the directory
> with
> >>> 700 permission. (Default: /.pgadmin/sessions directory.)
> >>> * Also - sets default value for the log file to be stored in the
> >>> '/.pgadmin' directory. This will allow us to keep separate
> >>> configuration per user on any operation system, when running through
> >>> runtime.
> >>>
> >>> This implementation uses sqlite as session storage, it may affect
> because
> >>> of explicit file system I/O operation. Though - performance should not
> be a
> >>> big issue, as we're not targeting to support very huge parallel
> sessions.
> >>
> >>
> >> Thanks - applied.
> >>
> >> I assume it's expected at this point that new connections still fail if
> >> the backend is restarted (that would come with graceful reconnections)?
> >>
> >
> >
> >
> > Heh, does this actually make sqlite a dependency for pgadmin4? That's
> kind
> > of hilarious :)
>
> It's actually been there for ages - we just now store session info in
> it as well as config settings.
>

Ha. That's what I get for not tracking the development properly.



> > Not saying it's wrong, absolutely not. Just expect a few laughs coming
> off
> > that one :D
>
> I'm aware of the irony :-). It's a perfectly fine embedded database
> though, and that's what we needed here. Running a Postgres instance
> for this is severe overkill - but I don't need to explain that to you.
>
>
Oh, I fully agree with that :) It's just funny.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: [pgadmin-hackers] pgAdmin4 PATCH: Domain Module

2016-03-23 Thread Dave Page
Did you forget to attach the latest patch?

On Wed, Mar 23, 2016 at 7:27 AM, Khushboo Vashi
 wrote:
> Updated one comment.
>
> On Wed, Mar 23, 2016 at 12:48 PM, Khushboo Vashi
>  wrote:
>>
>> Hi,
>>
>> Please find attached updated patch for the Domains module.
>>
>> On Wed, Mar 16, 2016 at 9:40 PM, Dave Page  wrote:
>>>
>>> Hi
>>>
>>> On Wed, Mar 16, 2016 at 2:03 PM, Khushboo Vashi
>>>  wrote:
>>> > Hi,
>>> >
>>> > Please find the updated Domain Module Patch.
>>> >
>>> > To test this patch, please apply Backgrid Textarea Cell Patch before
>>> > this.
>>>
>>> Thanks. I believe with the following fixes, we'll be done :-)
>>>
>>> - Default values should be auto-quoted when necessary (ie. strings, on
>>> a text-based domain).
>>
>> As per our discussion, this should leave unquoted.
>
> And also added a hint to the field stated 'Enter an expression or a value.'
>>
>>
>>> - "System Domain?" should be in the General section, between owner and
>>> comment.
>>
>> Done
>>>
>>> - The switches should use the same colouring/styling as other objects,
>>> e.g.
>>>
>>>   options: {
>>> 'onText': 'Yes', 'offText': 'No',
>>> 'onColor': 'success', 'offColor': 'primary',
>>> 'size': 'small'
>>>   }
>>
>> Done
>>>
>>> - Please remove the Schema property from the main properties tab (not
>>> the properties dialogue).
>>
>> Done
>>>
>>> - No icon is show for Checks on the Dependents tab for a domain.
>>
>> Done
>>>
>>> - The add button on the Security Labels tab is spelt "Add". Why is
>>> that? Other instances of this grid use "ADD" which is the default in
>>> backform.pgadmin.js.
>>
>> Done
>>>
>>> - Dependencies on domain check constraints are listed as being on a
>>> "Type" not a "Domain".
>>
>> Done
>>>
>>> - If adding a domain constraint using the grid on the Domain dialogue,
>>> I cannot specify "NOT VALID". We need a checkbox for that in a narrow
>>> columns at the end. Unchecking it for an existing constraint should be
>>> the equivalent of doing "ALTER DOMAIN ... VALIDATE CONSTRAINT"
>>
>> Done
>>>
>>> - If I switch the "Don't Validate" switch on a constraint, there are
>>> leading blank lines in the generated SQL. The same occurs when adding
>>> a comment to a constraint.
>>
>> Done
>>>
>>> - I think we need to reverse the meaning of "Don't Validate" and
>>> rename to match the "Valid?" field that's on the properties list.
>>> Otherwise it's not clear they're the same thing.
>>
>> Done
>>>
>>> - s/Not Null/Not Null?/
>>
>> Done
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: 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] pgAdmin4 PATCH: Domain Module

2016-03-23 Thread Ashesh Vashi
On Wed, Mar 23, 2016 at 3:09 PM, Dave Page  wrote:

> Did you forget to attach the latest patch?
>
She did it in the previous patch only.
She forgot to mention about the help string, which she did in later mail.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
> On Wed, Mar 23, 2016 at 7:27 AM, Khushboo Vashi
>  wrote:
> > Updated one comment.
> >
> > On Wed, Mar 23, 2016 at 12:48 PM, Khushboo Vashi
> >  wrote:
> >>
> >> Hi,
> >>
> >> Please find attached updated patch for the Domains module.
> >>
> >> On Wed, Mar 16, 2016 at 9:40 PM, Dave Page  wrote:
> >>>
> >>> Hi
> >>>
> >>> On Wed, Mar 16, 2016 at 2:03 PM, Khushboo Vashi
> >>>  wrote:
> >>> > Hi,
> >>> >
> >>> > Please find the updated Domain Module Patch.
> >>> >
> >>> > To test this patch, please apply Backgrid Textarea Cell Patch before
> >>> > this.
> >>>
> >>> Thanks. I believe with the following fixes, we'll be done :-)
> >>>
> >>> - Default values should be auto-quoted when necessary (ie. strings, on
> >>> a text-based domain).
> >>
> >> As per our discussion, this should leave unquoted.
> >
> > And also added a hint to the field stated 'Enter an expression or a
> value.'
> >>
> >>
> >>> - "System Domain?" should be in the General section, between owner and
> >>> comment.
> >>
> >> Done
> >>>
> >>> - The switches should use the same colouring/styling as other objects,
> >>> e.g.
> >>>
> >>>   options: {
> >>> 'onText': 'Yes', 'offText': 'No',
> >>> 'onColor': 'success', 'offColor': 'primary',
> >>> 'size': 'small'
> >>>   }
> >>
> >> Done
> >>>
> >>> - Please remove the Schema property from the main properties tab (not
> >>> the properties dialogue).
> >>
> >> Done
> >>>
> >>> - No icon is show for Checks on the Dependents tab for a domain.
> >>
> >> Done
> >>>
> >>> - The add button on the Security Labels tab is spelt "Add". Why is
> >>> that? Other instances of this grid use "ADD" which is the default in
> >>> backform.pgadmin.js.
> >>
> >> Done
> >>>
> >>> - Dependencies on domain check constraints are listed as being on a
> >>> "Type" not a "Domain".
> >>
> >> Done
> >>>
> >>> - If adding a domain constraint using the grid on the Domain dialogue,
> >>> I cannot specify "NOT VALID". We need a checkbox for that in a narrow
> >>> columns at the end. Unchecking it for an existing constraint should be
> >>> the equivalent of doing "ALTER DOMAIN ... VALIDATE CONSTRAINT"
> >>
> >> Done
> >>>
> >>> - If I switch the "Don't Validate" switch on a constraint, there are
> >>> leading blank lines in the generated SQL. The same occurs when adding
> >>> a comment to a constraint.
> >>
> >> Done
> >>>
> >>> - I think we need to reverse the meaning of "Don't Validate" and
> >>> rename to match the "Valid?" field that's on the properties list.
> >>> Otherwise it's not clear they're the same thing.
> >>
> >> Done
> >>>
> >>> - s/Not Null/Not Null?/
> >>
> >> Done
> >>>
> >>>
> >>>
> >>> --
> >>> Dave Page
> >>> Blog: http://pgsnake.blogspot.com
> >>> Twitter: @pgsnake
> >>>
> >>> EnterpriseDB UK: http://www.enterprisedb.com
> >>> The Enterprise PostgreSQL Company
> >>
> >>
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: 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] pgAdmin 4 commit: Set appropriate default values for the boolean switch

2016-03-23 Thread Dave Page
Set appropriate default values for the boolean switch control.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a6e96c55767a870f4114d4eee92113dbca9648d6

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)


-- 
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] PATCH: To fix an issue in server node refresh [pgAdmin4]

2016-03-23 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix an issue which was causing not to collapse & refresh
server node status when we disconnect from server.

Steps to reproduce the issue (with latest pull):

Step -1) Connect to server-1
Step -2) Expand the server till schema/collation node
Step -3) Now directly go to server-1 node again (do not collapse manually)
and right click on server-1 & click on Disconnect server


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


fixed_server_node_refresh_issue.patch
Description: Binary data

-- 
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] pgAdmin 4 commit: Fixed the refresh issue when a server gets disconnect

2016-03-23 Thread Ashesh Vashi
Fixed the refresh issue when a server gets disconnected.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0e044e121685aa9362f3a508522fda255a3ff5a5
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/browser/server_groups/servers/templates/servers/servers.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
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] PATCH: To fix an issue in server node refresh [pgAdmin4]

2016-03-23 Thread Ashesh Vashi
On Wed, Mar 23, 2016 at 4:46 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix an issue which was causing not to collapse &
> refresh server node status when we disconnect from server.
>
> Steps to reproduce the issue (with latest pull):
>
> Step -1) Connect to server-1
> Step -2) Expand the server till schema/collation node
> Step -3) Now directly go to server-1 node again (do not collapse manually)
> and right click on server-1 & click on Disconnect server
>
Thanks - committed with small change.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: 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] pgAdmin 4 commit: Don't display packages as schemas.

2016-03-23 Thread Dave Page
Don't display packages as schemas.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=258c7f3589f3a62a81552ab492af9a9dae40d6f4

Modified Files
--
.../databases/schemas/templates/schema/ppas/9.1_plus/sql/nodes.sql   | 1 +
.../databases/schemas/templates/schema/ppas/9.2_plus/sql/nodes.sql   | 1 +
2 files changed, 2 insertions(+)


-- 
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] pgAdmin 4 commit: We have defaults for switch display now, so no need t

2016-03-23 Thread Dave Page
We have defaults for switch display now, so no need to set the options 
explicitly.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1ac16cbc0ff66d2387b139779a71189d98959eea

Modified Files
--
.../servers/databases/schemas/templates/schema/js/schema.js| 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)


-- 
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] [pgAdmin4][Patch]: Functions/Procedures Module

2016-03-23 Thread Dave Page
On Tue, Mar 22, 2016 at 10:51 AM, Khushboo Vashi
 wrote:
> Hi,
>
> Please find updated Patch for the Functions/Procedures Module.

Hi

Unfortunately I found more issues as I tested in-depth. I've attached
an updated patch in which I've done some cleanup - additional comments
below:

- Some argument lists are shown with an extra space, e.g.

character varying , integer

(pem.create_agent(character varying , integer))

- A 404 error is seen when functions are selected under a Catalog node.

- Procedures have a property of "System function?" - should be "System
procedure?"

- The Return Type, Returns a Set and Window fields should be hidden
for Procedures.

- When creating a procedure (below), I get the following error:

-
-- PROCEDURE: foo

-- DROP PROCEDURE foo;

CREATE OR REPLACE PROCEDURE public.foo(IN a integer DEFAULT 10, INOUT
b integer DEFAULT  -)
VOLATILE NOT LEAKPROOF SECURITY DEFINER
COST 100.0
AS

BEGIN
   b:=a+b+1;
END;

COMMENT ON PROCEDURE public.foo
IS 'Foo procedure';
-

-
2016-03-23 11:22:02,186: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
11:22:02] "GET /browser/procedure/obj/1/2/14844/13627/16387 HTTP/1.1"
500 -
Traceback (most recent call last):
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1836, in __call__
return self.wsgi_app(environ, start_response)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1817, in wsgi_app
response = self.full_dispatch_request()
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1475, in full_dispatch_request
rv = self.dispatch_request()
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
line 84, in view
return self.dispatch_request(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
233, in dispatch_request
return method(*args, **kwargs)
  File 
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py",
line 349, in wrap
return f(*args, **kwargs)
  File 
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py",
line 425, in properties
resp_data = self._fetch_properties(gid, sid, did, scid, fnid)
  File 
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py",
line 1097, in _fetch_properties
resp_data = res['rows'][0]
IndexError: list index out of range
-

- After a Python server reset, I get the following error when trying
to view SQL of a Procedure (seems like it thinks it's connected to
PG?):

TemplateNotFound: procedure/pg/sql/9.5_plus/node.sql
2016-03-23 11:28:52,852: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
11:28:52] "GET /browser/procedure/nodes/1/2/14844/2200/ HTTP/1.1" 500
-
Traceback (most recent call last):
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1836, in __call__
return self.wsgi_app(environ, start_response)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1817, in wsgi_app
response = self.full_dispatch_request()
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1475, in full_dispatch_request
rv = self.dispatch_request()
  File 
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1461, in dispatch_request
r

Re: [pgadmin-hackers] pgAdmin4 PATCH: Domain Module

2016-03-23 Thread Dave Page
Hi

Almost there :-s

- The hint for default should be a placeholder in the textbox itself
(like combos have "Select from the list"

- I should be able to check the "Validate?" option on one or more
constraints from within the Domain dialogue

- Please ensure the capitalisation of all property labels is
consistent - it should be "Base type" not "Base Type", "System
domain?" not "System Domain?" etc.

- The check constraint reverse engineered SQL should include the path
to the constraint, e.g.

-- CHECK: schema.domain.check_at

Once that's done, it can be committed I think.

Thanks.

On Wed, Mar 23, 2016 at 7:27 AM, Khushboo Vashi
 wrote:
> Updated one comment.
>
> On Wed, Mar 23, 2016 at 12:48 PM, Khushboo Vashi
>  wrote:
>>
>> Hi,
>>
>> Please find attached updated patch for the Domains module.
>>
>> On Wed, Mar 16, 2016 at 9:40 PM, Dave Page  wrote:
>>>
>>> Hi
>>>
>>> On Wed, Mar 16, 2016 at 2:03 PM, Khushboo Vashi
>>>  wrote:
>>> > Hi,
>>> >
>>> > Please find the updated Domain Module Patch.
>>> >
>>> > To test this patch, please apply Backgrid Textarea Cell Patch before
>>> > this.
>>>
>>> Thanks. I believe with the following fixes, we'll be done :-)
>>>
>>> - Default values should be auto-quoted when necessary (ie. strings, on
>>> a text-based domain).
>>
>> As per our discussion, this should leave unquoted.
>
> And also added a hint to the field stated 'Enter an expression or a value.'
>>
>>
>>> - "System Domain?" should be in the General section, between owner and
>>> comment.
>>
>> Done
>>>
>>> - The switches should use the same colouring/styling as other objects,
>>> e.g.
>>>
>>>   options: {
>>> 'onText': 'Yes', 'offText': 'No',
>>> 'onColor': 'success', 'offColor': 'primary',
>>> 'size': 'small'
>>>   }
>>
>> Done
>>>
>>> - Please remove the Schema property from the main properties tab (not
>>> the properties dialogue).
>>
>> Done
>>>
>>> - No icon is show for Checks on the Dependents tab for a domain.
>>
>> Done
>>>
>>> - The add button on the Security Labels tab is spelt "Add". Why is
>>> that? Other instances of this grid use "ADD" which is the default in
>>> backform.pgadmin.js.
>>
>> Done
>>>
>>> - Dependencies on domain check constraints are listed as being on a
>>> "Type" not a "Domain".
>>
>> Done
>>>
>>> - If adding a domain constraint using the grid on the Domain dialogue,
>>> I cannot specify "NOT VALID". We need a checkbox for that in a narrow
>>> columns at the end. Unchecking it for an existing constraint should be
>>> the equivalent of doing "ALTER DOMAIN ... VALIDATE CONSTRAINT"
>>
>> Done
>>>
>>> - If I switch the "Don't Validate" switch on a constraint, there are
>>> leading blank lines in the generated SQL. The same occurs when adding
>>> a comment to a constraint.
>>
>> Done
>>>
>>> - I think we need to reverse the meaning of "Don't Validate" and
>>> rename to match the "Valid?" field that's on the properties list.
>>> Otherwise it's not clear they're the same thing.
>>
>> Done
>>>
>>> - s/Not Null/Not Null?/
>>
>> Done
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: 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] [pgAdmin4][Patch]: Functions/Procedures Module

2016-03-23 Thread Khushboo Vashi
Hi Dave,

I think you forgot to attach the updated patch.

Thanks,
Khushboo

On Wed, Mar 23, 2016 at 5:33 PM, Dave Page  wrote:

> On Tue, Mar 22, 2016 at 10:51 AM, Khushboo Vashi
>  wrote:
> > Hi,
> >
> > Please find updated Patch for the Functions/Procedures Module.
>
> Hi
>
> Unfortunately I found more issues as I tested in-depth. I've attached
> an updated patch in which I've done some cleanup - additional comments
> below:
>
> - Some argument lists are shown with an extra space, e.g.
>
> character varying , integer
>
> (pem.create_agent(character varying , integer))
>
> - A 404 error is seen when functions are selected under a Catalog node.
>
> - Procedures have a property of "System function?" - should be "System
> procedure?"
>
> - The Return Type, Returns a Set and Window fields should be hidden
> for Procedures.
>
> - When creating a procedure (below), I get the following error:
>
> -
> -- PROCEDURE: foo
>
> -- DROP PROCEDURE foo;
>
> CREATE OR REPLACE PROCEDURE public.foo(IN a integer DEFAULT 10, INOUT
> b integer DEFAULT  -)
> VOLATILE NOT LEAKPROOF SECURITY DEFINER
> COST 100.0
> AS
>
> BEGIN
>b:=a+b+1;
> END;
>
> COMMENT ON PROCEDURE public.foo
> IS 'Foo procedure';
> -
>
> -
> 2016-03-23 11:22:02,186: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
> 11:22:02] "GET /browser/procedure/obj/1/2/14844/13627/16387 HTTP/1.1"
> 500 -
> Traceback (most recent call last):
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1836, in __call__
> return self.wsgi_app(environ, start_response)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1820, in wsgi_app
> response = self.make_response(self.handle_exception(e))
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1403, in handle_exception
> reraise(exc_type, exc_value, tb)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1817, in wsgi_app
> response = self.full_dispatch_request()
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1477, in full_dispatch_request
> rv = self.handle_user_exception(e)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1381, in handle_user_exception
> reraise(exc_type, exc_value, tb)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1475, in full_dispatch_request
> rv = self.dispatch_request()
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1461, in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
> line 84, in view
> return self.dispatch_request(*args, **kwargs)
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
> 233, in dispatch_request
> return method(*args, **kwargs)
>   File
> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py",
> line 349, in wrap
> return f(*args, **kwargs)
>   File
> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py",
> line 425, in properties
> resp_data = self._fetch_properties(gid, sid, did, scid, fnid)
>   File
> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py",
> line 1097, in _fetch_properties
> resp_data = res['rows'][0]
> IndexError: list index out of range
> -
>
> - After a Python server reset, I get the following error when trying
> to view SQL of a Procedure (seems like it thinks it's connected to
> PG?):
>
> TemplateNotFound: procedure/pg/sql/9.5_plus/node.sql
> 2016-03-23 11:28:52,852: INFO werkzeug: 127.0.0.1 - - [23/Mar/2016
> 11:28:52] "GET /browser/procedure/nodes/1/2/14844/2200/ HTTP/1.1" 500
> -
> Traceback (most recent call last):
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1836, in __call__
> return self.wsgi_app(environ, start_response)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1820, in wsgi_app
> response = self.make_response(self.handle_exception(e))
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1403, in handle_exception
> reraise(exc_type, exc_value, tb)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1817, in wsgi_app
> response = self.full_dispatch_request()
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1477, in full_dispatch_request
> rv = self.handle_user_exception(e)
>   File
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages

[pgadmin-hackers] [pgAdmin4] PATCH: Added Utility functions for triggers node and rules node

2016-03-23 Thread Surinder Kumar
Hi,

Trigger and Rules nodes have functions which are also used by view node.
View node use them while generating reverse engineering SQL for respective
nodes.
so they are moved into schema/utils.py


Please review the patch.


Thanks,
Surinder Kumar


utility_functions_for_trigger_and_rule_node.patch
Description: Binary data

-- 
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] pgAdmin 4 commit: String improvements.

2016-03-23 Thread Dave Page
String improvements.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=72f635356175ac94cdcc0e4c122a16629df06f5f

Modified Files
--
web/pgadmin/browser/templates/browser/js/browser.js | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)


-- 
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] pgAdmin 4 commit: String improvements.

2016-03-23 Thread Dave Page
String improvements.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2a2374329efb07a9a4532f4c719c0704e8c3037c

Modified Files
--
web/pgadmin/browser/templates/browser/js/node.js | 8 
1 file changed, 4 insertions(+), 4 deletions(-)


-- 
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] Control for displaying "auto vacuum" fields into grid

2016-03-23 Thread Surinder Kumar
Hi,


On Fri, Mar 18, 2016 at 8:58 PM, Dave Page  wrote:

> On Fri, Mar 18, 2016 at 10:37 AM, Surinder Kumar
>  wrote:
> > Hi,
> >
> > PFA control for displaying auto vacuum fields into grid. This control is
> > common for
> > Materialized View Node and Table Node.
> >
> > Usage:
> >
> > {
> >   id: 'vacuum_table', label: '{{ _("Vacuum Table") }}',
> >   model: VacuumTableModel, editable: false, type: 'collection',
> >   canEdit: true, group: '{{ _("Table") }}',
> >   mode: ['edit', 'create'], url: 'get_vacuum_defaults',
> >   control: Backform.VacuumCollectionControl.extend({
> > grid_columns :[
> >   {
> > name: 'label', label: '{{ _("Label") }}',
> > cell: 'string', editable: false
> >   },
> >   {
> > name: 'value', label: '{{ _("Value") }}',
> > cellFunction: cellFunction, editable: function(m) {
> >   if(m.handler.has('autovacuum_enabled')) {
> > return m.handler.get('autovacuum_enabled');
> >   }
> >   return !m.handler.isNew();
> > }
> >   },
> >   {
> > name: 'setting', label: '{{ _("Default value") }}',
> > cellFunction: cellFunction, editable: false
> >   }
> > ]
> >   }),
> >
> >
> > When using this control, provide following parameters in schema:
> > 1. model
> > 2. url - to fetch default values for auto vacuum fields.
> > 3. grid columns - Name of the columns to display in the grid.
> >
> >
> > Please review the patch.
>
> It's hard to review this without being able to test. Do you have a
> simple test case?
>

I have submitted patch for materialized view which is using this control.
so you can test it in materialized view.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>