Re: pgAdmin 4 - next gettext usage fixes

2020-04-19 Thread Libor M.
Hi,
I sending patch for slightly modified the use of gettext:
- fixed `%` vs. `.format()`
- unified texts and usage `%s` vs. `{}`/`{0}`
- improved text sentences for translate
- added gettext for next texts

Best regards,

Libor M.

E-mail: libor...@gmail.com
GitHub: https://github.com/liborm85

čt 16. 4. 2020 v 9:51 odesílatel Akshay Joshi
 napsal:
>
> Thanks, patch applied.
>
> On Wed, Apr 15, 2020 at 5:17 PM Libor M.  wrote:
>>
>> Hi,
>> next minor gettext and format fixes in patch.
>>
>> Best regards,
>>
>> Libor M.
>>
>> E-mail: libor...@gmail.com
>> GitHub: https://github.com/liborm85
>>
>> st 15. 4. 2020 v 13:17 odesílatel Akshay Joshi
>>  napsal:
>> >
>> > Thanks, patch applied.
>> >
>> > On Wed, Apr 15, 2020 at 2:55 PM Aditya Toshniwal 
>> >  wrote:
>> >>
>> >> Hi,
>> >>
>> >> Please find the updated patch.
>> >>
>> >> On Wed, Apr 15, 2020 at 1:33 PM Akshay Joshi 
>> >>  wrote:
>> >>>
>> >>> Hi Aditya
>> >>>
>> >>> I think the fix is incorrect. .format method should be applied after 
>> >>> gettext() like gettext().format(). Please check for other places too and 
>> >>> send the updated patch.
>> >>>
>> >>> On Wed, Apr 15, 2020 at 11:38 AM Aditya Toshniwal 
>> >>>  wrote:
>> 
>>  Hi Hackers/Libor,
>> 
>>  The changes like below are incorrect. Try "Count rows" from a table's 
>>  context menu.
>> 
>>  -info=gettext("Table rows counted: %s" % count),
>> 
>>  +info=gettext("Table rows counted: %s") % count,
>> 
>> 
>>  Attached is the patch to fix all such changes in pgAdmin, to use 
>>  format() instead.
>>  Please review.
>> 
>>  On Fri, Apr 10, 2020 at 2:57 PM Akshay Joshi 
>>   wrote:
>> >
>> > Hi Libor
>> >
>> > Thanks, patch applied. Please make sure to run the PEP8 checks before 
>> > sending the patch.
>> > I have fixed and committed the code.
>> >
>> > On Wed, Apr 8, 2020 at 9:30 PM Libor M.  wrote:
>> >>
>> >> Hello,
>> >> I fixed next gettext usage:
>> >>
>> >> - fixed gettext usage with .format() only for original text with %s
>> >> - fixed typos
>> >> - fixed translation yes/no buttons in dialog
>> >> - improved translating sentences without "connecting" words (eg. see
>> >> web/pgadmin/dashboard/static/js/dashboard.js, word 'cancel' needs to
>> >> be translated in Czech language as 'zrušit' but in another sentence as
>> >> 'zrušení')
>> >> - added gettext for text translations
>> >>
>> >> Diff file is attached.
>> >>
>> >> Best regards,
>> >>
>> >> Libor M.
>> >>
>> >> E-mail: libor...@gmail.com
>> >> GitHub: https://github.com/liborm85
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> > Akshay Joshi
>> > Sr. Software Architect
>> > EnterpriseDB Software India Private Limited
>> > Mobile: +91 976-788-8246
>> 
>> 
>> 
>>  --
>>  Thanks and Regards,
>>  Aditya Toshniwal
>>  pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>>  "Don't Complain about Heat, Plant a TREE"
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards
>> >>> Akshay Joshi
>> >>> Sr. Software Architect
>> >>> EnterpriseDB Software India Private Limited
>> >>> Mobile: +91 976-788-8246
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks and Regards,
>> >> Aditya Toshniwal
>> >> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>> >> "Don't Complain about Heat, Plant a TREE"
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> > Akshay Joshi
>> > Sr. Software Architect
>> > EnterpriseDB Software India Private Limited
>> > Mobile: +91 976-788-8246
>
>
>
> --
> Thanks & Regards
> Akshay Joshi
> Sr. Software Architect
> EnterpriseDB Software India Private Limited
> Mobile: +91 976-788-8246


pgadmin4_gettext_fix.diff
Description: Binary data


Re: pgAdmin is freezing

2020-04-19 Thread Khushboo Vashi
Hi,

On Sat, Apr 18, 2020 at 1:41 AM Nagaraj Raj  wrote:

> Hi,
>
> pgAdmin is freezing for other activities when dropping any table or index
> if command is held because of any lock occurring. In this state unable to
> access any other objects like stats, SQL statements, descriptions or query
> tool for other objects. pgAdmin resume to start working fine after either 
> releasing
> lock or killed the process in the server.
> Is it a bug or its know behavior of pgAdmin?
>
> If a particular table/index is locked and you are trying to fetch the
details for the same object then I think this is the expected behaviour but
at the same time if you can not access the details of the other database
objects then it's a bug.

Thanks,
Khushboo

> Currently, I'm using the latest version pgAdmin 4 v4.20.
>
>
>
> Thanks,
> Rj
>
>
>
>


Re: [pgAdmin][RM4946] Issue with temporary tables on commit drop as.

2020-04-19 Thread Khushboo Vashi
Hi Amol,

The patch is working fine and looks good to me however some code related
review comments:

1. The test case is particularly written for Temporary table with Commit
Drop, so please mention it in the comments.
2. Also, the class TestQueryUpdatableResultset is been inherited, so no
need to repeat the same methods, for example: setUp, _execute_select_sql,
tearDown


Thanks,
Khushboo


On Fri, Apr 17, 2020 at 3:49 PM Amol Vyavahare <
amol.vyavah...@enterprisedb.com> wrote:

> Hi Khushboo,
>
> Please find attached the updated patch with the latest changes as
> suggested along with API test cases for the RM4946 issue fix.
>
> Thank You.
>
> On Wed, Apr 15, 2020 at 2:26 PM Amol Vyavahare <
> amol.vyavah...@enterprisedb.com> wrote:
>
>> Sure, will do that.
>>
>> On Wed, Apr 15, 2020 at 1:33 PM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Amol,
>>>
>>> On Wed, Apr 15, 2020 at 12:06 PM Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 I am reviewing this patch.

 Thanks,
 Khushboo

 On Wed, Apr 15, 2020 at 11:45 AM Amol Vyavahare <
 amol.vyavah...@enterprisedb.com> wrote:

> Hi Hackers,
> Attached is the patch to fix the Issue with temporary tables on
> commit drop as. This patch fixes the issue where an error was thrown when
> the user tried to create a temporary table via query tool and no result
> was displayed when the query was executed.
>
> Please review.
>
> Please write the API test cases for the same even if the changes are
>>> very small but they are in the SQL Editor backend code.
>>> The patch is working fine and looks good to me.
>>>
>>> Thanks,
>>> Khushboo
>>>
 --
> *Regards,*
> *Amol Vyavahare*
> *E**nterpriseDB Corporation*
> The Enterprise Postgres Company
> *T: +91 20 6644 9600, M: +91 738 738 2128*
> [image: EDB Postgres] Unit 301 A, Third
> Floor, Godrej Castlemaine,
> 155, Sassoon Road, Pune, MH - 411001
> [image: Blog Feed]  [image: Facebook]
>  [image: Twitter]
>  [image: LinkedIn]
>  [image: Google+]
> 
> Website: www.enterprisedb.com
> EnterpriseDB Blog: http://blogs.enterprisedb.com/
> Follow us on Twitter: http://www.twitter.com/enterprisedb
>
>
>
>
>>
>> --
>> *Regards,*
>> *Amol Vyavahare*
>> *E**nterpriseDB Corporation*
>> The Enterprise Postgres Company
>> *T: +91 20 6644 9600, M: +91 738 738 2128*
>> [image: EDB Postgres] Unit 301 A, Third
>> Floor, Godrej Castlemaine,
>> 155, Sassoon Road, Pune, MH - 411001
>> [image: Blog Feed]  [image: Facebook]
>>  [image: Twitter]
>>  [image: LinkedIn]
>>  [image: Google+]
>> 
>> Website: www.enterprisedb.com
>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>
>>
>>
>>
>
> --
> *Regards,*
> *Amol Vyavahare*
> *E**nterpriseDB Corporation*
> The Enterprise Postgres Company
> *T: +91 20 6644 9600, M: +91 738 738 2128*
> [image: EDB Postgres] Unit 301 A, Third
> Floor, Godrej Castlemaine,
> 155, Sassoon Road, Pune, MH - 411001
> [image: Blog Feed]  [image: Facebook]
>  [image: Twitter]
>  [image: LinkedIn]
>  [image: Google+]
> 
> Website: www.enterprisedb.com
> EnterpriseDB Blog: http://blogs.enterprisedb.com/
> Follow us on Twitter: http://www.twitter.com/enterprisedb
>
>
>
>


Re: [pgAdmin][RM5157] Default sort order at start in view table data by primary key by default

2020-04-19 Thread Khushboo Vashi
Hi Navnath,

Review comments:

1. If we have multiple Primary keys, then we should include all the keys
into the Order by clause.
2. In the Preferences dialog, please put this option  in the Query Tool >
Options instead of Result Grid and also change the Label.
3. Please optimize the code, as I can see objectname.sql file is being used
in else condition also, which is not required. Based on the parameter
setting, Just one call of that sql is enough.

Thanks,
Khushboo


On Fri, Apr 17, 2020 at 6:43 PM navnath gadakh <
navnath.gad...@enterprisedb.com> wrote:

> Hello Hackers,
>
>  Please find the modified patch with an option in Preferences for data
> sorting by the primary key. Also, the previous  patch was not working with
> table has no primary key.
>
> Thanks!
>
>
>
>
> On Thu, Apr 16, 2020 at 5:01 PM Dave Page 
> wrote:
>
>>
>>
>> On Thu, Apr 16, 2020 at 12:08 PM navnath gadakh <
>> navnath.gad...@enterprisedb.com> wrote:
>>
>>> Hi Dave/Team,
>>>   This patch is related to the default sort order for the view
>>> table data. In pgAdminIII default ordering is by primary key and this is
>>> not working in pgAdminIV.
>>> I have attached the patch with the back end code.
>>>
>>> Please review it.
>>>
>>> *Question*: There is one suggestion on
>>> https://redmine.postgresql.org/issues/5157 about to put a checkbox in
>>> the configuration for this behavior.
>>>   Do I need to implement that really? I yes, Is
>>> preferences a good place for that? / Suggestions?
>>>
>>
>> I think we should make this optional, and yes, Preferences is a good
>> place. The reason is that sorting data is not without cost - at the very
>> least it will require use of an index to access what may be the whole table.
>>
>> --
>> Dave Page
>> VP & Chief Architect, Database Infrastructure
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>
>
> --
> Regards,
> Navnath Gadakh
>


Re: [pgAdmin][RM5396] Unable to locate this object in the browser in search objects

2020-04-19 Thread Akshay Joshi
Hi Aditya

Jasmine tests are failing. Please fix and resend the patch.

On Fri, Apr 17, 2020 at 6:49 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached is the patch to fix the issues raised in the RM and other issues
> which I encountered while fixing. Following are the details:
> 1) Not able to locate indexes, trigger under partition of partitioned
> table.
> 2) Not able to locate columns under catalog schemas other than pg_catalog.
> 3) Not able to locate foreign keys.
> 4) Not able to locate rules under a view.
> 5) Not able to locate user mapping
> 6) Rules of materialized view and Types from dbms_* packages on EPAS
> servers should not be listed in search objects as they are not visible in
> the browser tree.
>
> Please review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM5396] Unable to locate this object in the browser in search objects

2020-04-19 Thread Aditya Toshniwal
Hi,

Attached is the updated patch to also make required changes in the test
cases.
Please review.

On Mon, Apr 20, 2020 at 11:28 AM Akshay Joshi 
wrote:

> Hi Aditya
>
> Jasmine tests are failing. Please fix and resend the patch.
>
> On Fri, Apr 17, 2020 at 6:49 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch to fix the issues raised in the RM and other
>> issues which I encountered while fixing. Following are the details:
>> 1) Not able to locate indexes, trigger under partition of partitioned
>> table.
>> 2) Not able to locate columns under catalog schemas other than pg_catalog.
>> 3) Not able to locate foreign keys.
>> 4) Not able to locate rules under a view.
>> 5) Not able to locate user mapping
>> 6) Rules of materialized view and Types from dbms_* packages on EPAS
>> servers should not be listed in search objects as they are not visible
>> in the browser tree.
>>
>> Please review.
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM5396_v2.patch
Description: Binary data