pgAdmin 4 commit: Allow editing of data where a primary key column incl
Allow editing of data where a primary key column includes a % sign in the value. Fixes #4036 Fix an XSS issue seen in View/Edit data mode if a column name includes HTML. Fixes #4367 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=6e8ebbd375f825acde7383244bf83d1c9c1c15e5 Author: Aditya Toshniwal Modified Files -- docs/en_US/release_notes_4_9.rst | 4 +- .../xss_checks_panels_and_query_tool_test.py | 28 - web/pgadmin/tools/sqleditor/__init__.py| 7 +++- web/pgadmin/tools/sqleditor/command.py | 46 -- web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 4 +- .../templates/sqleditor/sql/default/insert.sql | 2 +- .../templates/sqleditor/sql/default/update.sql | 2 +- web/pgadmin/utils/driver/psycopg2/cursor.py| 3 ++ web/regression/feature_utils/pgadmin_page.py | 22 +++ web/regression/python_test_utils/test_utils.py | 17 +--- 10 files changed, 112 insertions(+), 23 deletions(-)
[pgAdmin4][Patch] - RM 4380 - Table properties dialog - can not edit columns and partitions at the same time
Hi, Please find the attached patch to fix the RM #4380 - Table properties dialog - can not edit columns and partitions at the same time. Thanks, Khushboo RM_4380.patch Description: Binary data
pgAdmin 4 commit: Fix formatting change which inadvertently broke the f
Fix formatting change which inadvertently broke the feature tests. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=fb4afce6296741da20d13d9ed7172b147f031834 Modified Files -- web/pgadmin/static/js/sqleditor/history/query_history_details.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
pgAdmin 4 commit: Remove additional "SETOF" included when generating CR
Remove additional "SETOF" included when generating CREATE scripts for trigger functions. Fixes #4362 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=81752bb9984765ae1621806311e3db52adea0dad Modified Files -- docs/en_US/release_notes_4_9.rst | 1 + .../functions/templates/trigger_functions/pg/sql/11_plus/create.sql| 3 ++- .../functions/templates/trigger_functions/pg/sql/9.2_plus/create.sql | 3 ++- .../functions/templates/trigger_functions/pg/sql/9.5_plus/create.sql | 3 ++- .../functions/templates/trigger_functions/pg/sql/default/create.sql| 3 ++- .../functions/templates/trigger_functions/ppas/sql/9.2_plus/create.sql | 3 ++- .../functions/templates/trigger_functions/ppas/sql/9.5_plus/create.sql | 3 ++- .../functions/templates/trigger_functions/ppas/sql/default/create.sql | 3 ++- 8 files changed, 15 insertions(+), 7 deletions(-)
Re: [pgAdmin4][Patch]: RM #4362 trigger function create script
Thanks, applied. On Thu, Jun 20, 2019 at 7:48 AM Akshay Joshi wrote: > Hi Dave > > On Wed, Jun 19, 2019 at 8:47 PM Akshay Joshi < > akshay.jo...@enterprisedb.com> wrote: > >> Hi Dave >> >> On Wed, 19 Jun, 2019, 19:57 Dave Page, wrote: >> >>> Hi >>> >>> On Wed, Jun 19, 2019 at 9:55 AM Akshay Joshi < >>> akshay.jo...@enterprisedb.com> wrote: >>> Hi Hackers, Attached is the patch to fix RM #4362 trigger function create script. Please review it. >>> >>> While I can see how this works, I question why we have the string >>> "SETOF" in prorettypname anyway? That's a separate property, so it should >>> be in a separate variable. What if I have a type called "SETOFDavesStuff" >>> (unlikely, but it illustrates the point)? >>> >> >> We have used pg_get_function_result(func_oid) to get the returns >> clause for function and assign its value to prorettypename variable. I have >> followed the same logic for trigger function and fixed it. Similar logic >> has already been used for functions. >> > > I have tested it with two different type "SETOF TypeTest" and > "SETOFType" for function, as trigger_function only have return type either > trigger or event_trigger. I haven't found any issue with the reverse > engineered sql and create script as well. > >> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >> > > -- > *Thanks & Regards* > *Akshay Joshi* > > *Sr. Software Architect* > *EnterpriseDB Software India Private Limited* > *Mobile: +91 976-788-8246* > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
pgAdmin 4 commit: Fix regression tests.
Fix regression tests. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=78d55c7cc0a5ac1f7783fbc4f086421900192f16 Author: Aditya Toshniwal Modified Files -- web/pgadmin/tools/sqleditor/tests/test_view_data_templates.py | 5 + 1 file changed, 5 insertions(+)
pgAdmin 4 commit: Ensure that both columns and partitions can be edited
Ensure that both columns and partitions can be edited at the same time in the table dialog. Fixes #4380 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c07e52b9de6ed53b9f43be7ab12092596e12ea05 Author: Khushboo Vashi Modified Files -- docs/en_US/release_notes_4_9.rst | 3 +- .../servers/databases/schemas/tables/utils.py | 44 +++--- 2 files changed, 24 insertions(+), 23 deletions(-)
Re: [pgAdmin4][Patch] - RM 4380 - Table properties dialog - can not edit columns and partitions at the same time
Thanks, applied. On Thu, Jun 20, 2019 at 12:25 PM Khushboo Vashi < khushboo.va...@enterprisedb.com> wrote: > Hi, > > Please find the attached patch to fix the RM #4380 - Table properties > dialog - can not edit columns and partitions at the same time. > > Thanks, > Khushboo > > > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
pgAdmin 4 commit: Fix regression tests.
Fix regression tests. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=9dbb74367d277099eedd605b8d6e9f84cd9382f2 Modified Files -- web/regression/javascript/history/query_history_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
pgAdmin 4 commit: PEP-8 fixes.
PEP-8 fixes. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=644624eabe3661d429efccc123d070815a040fae Modified Files -- .../server_groups/servers/databases/schemas/tables/utils.py | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-)
Re: [GSoC][Patch] Automatic Mode Detection V1
On Thu, Jun 20, 2019 at 7:49 AM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > [forked the mail chain for code review] > Hi Yosry, > > On Wed, Jun 19, 2019 at 5:24 PM Dave Page wrote: > >> >> Aditya; can you do a quick code review please? Bear in mind it's a work >> in progress and there are no docs or tests etc. yet. >> > Nice work there. :) > > I just had look on the code changes, and have few suggestions: > 1) I found the code around primary key in the function > check_for_updatable_resultset_and_primary_keys repeating. Try if you > cpuld modify/reuse the get_primary_keys function. > 2) The function name check_for_updatable_resultset_and_primary_keys could > be shorter, something like check_updatabale_rset_pkeys. Same for > __set_updatable_resultset_attributes to __set_updatable_rset_attr > 3) You've used background: #f4f4f4; for .highlighted_grid_cells class. > This should go to sqleditor.scss with appropriate color from > web/pgadmin/static/scss/resources/_default.variables.scss. Hard coded color > codes are highly discouraged. > Otherwise, looks good (didn't run and check) > >> >> > I shortened both function names and fixed the hard-coded color. For #1, in the QueryToolCommand different processing of the primary keys occur in is_query_resultset_updatable function, where the attribute number of the primary keys is compared against columns and so. The only repeated part in check_for_updatable_resultset_and_primary_keys is the part where pk_names string is created in the required format (which is only a few lines of code). I could factor it out to a utility function - takes primary_keys dict and returns the pk_names string in the required format. What do you think? These changes (together with other changes that I am working on) will be included in the next version of this patch. Thanks ! -- *Yosry Muhammad Yosry* Computer Engineering student, The Faculty of Engineering, Cairo University (2021). Class representative of CMP 2021. https://www.linkedin.com/in/yosrym93/
change to Docker entrypoint.sh
Hi All! I am new to this, so I apologize beforehand if it's not entirely kosher, but I have a proposed change to the Dockerfile entrypoint.sh to allow for configurable servers.json filename path. The reasoning behind this is that I have a Kubernetes deployment of pgadmin where I build a ConfigMap sort of dynamically. I can make the file appear in /pgadmin4, but it removes the contents of the directory for me (helpful!). Instead, I put it into a separate directory and set a new environment variable that defaults to the old pathname (backwards-compatible!) but allows me to set a custom environment variable in my custom Helm chart for my deployment. The code is here: https://github.com/penguincoder/pgadmin4/commit/0865400385ac0d03bf69d183e8cd9aaec6dcf318 Is this something that anyone is interested in? Does it meet your coding standards? What do I do next? I would love to move back to the "official" pgadmin container. Thanks for your time, Andrew