public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][RM5845] Free query windows hard capped to 1000 results sometimes
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin][RM5845] Free query windows hard capped to 1000 results sometimes
@ 2020-09-21 08:06 Aditya Toshniwal <[email protected]>
  2020-09-22 04:17 ` Re: [pgAdmin][RM5845] Free query windows hard capped to 1000 results sometimes Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Aditya Toshniwal @ 2020-09-21 08:06 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Attached is the patch to fix the issue where the query tool is not fetching
more than 1000 rows. The issue occurs only when a table does not have any
primary key.

Please review.

-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM5845.patch (1.6K, 3-RM5845.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/utils/is_query_resultset_updatable.py b/web/pgadmin/tools/sqleditor/utils/is_query_resultset_updatable.py
index 013c05da8..99c8fe53d 100644
--- a/web/pgadmin/tools/sqleditor/utils/is_query_resultset_updatable.py
+++ b/web/pgadmin/tools/sqleditor/utils/is_query_resultset_updatable.py
@@ -75,17 +75,16 @@ def is_query_resultset_updatable(conn, sql_path):
         is_resultset_updatable = has_oids or (primary_keys is not None and
                                               len(primary_keys) != 0)
 
-        if is_resultset_updatable:
-            column_types = get_columns_types(columns_info=columns_info,
-                                             table_oid=table_oid,
-                                             conn=conn,
-                                             has_oids=has_oids,
-                                             is_query_tool=True)
-            return True, has_oids, primary_keys, \
-                pk_names, table_oid, column_types
-        else:
+        if not is_resultset_updatable:
             _set_all_columns_not_editable(columns_info=columns_info)
-            return return_not_updatable()
+
+        column_types = get_columns_types(columns_info=columns_info,
+                                         table_oid=table_oid,
+                                         conn=conn,
+                                         has_oids=has_oids,
+                                         is_query_tool=True)
+        return is_resultset_updatable, has_oids, primary_keys, \
+            pk_names, table_oid, column_types
     else:
         raise InternalServerError(SERVER_CONNECTION_CLOSED)
 


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin][RM5845] Free query windows hard capped to 1000 results sometimes
  2020-09-21 08:06 [pgAdmin][RM5845] Free query windows hard capped to 1000 results sometimes Aditya Toshniwal <[email protected]>
@ 2020-09-22 04:17 ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2020-09-22 04:17 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Mon, Sep 21, 2020 at 1:37 PM Aditya Toshniwal <
[email protected]> wrote:

> Hi Hackers,
>
> Attached is the patch to fix the issue where the query tool is not
> fetching more than 1000 rows. The issue occurs only when a table does not
> have any primary key.
>
> Please review.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-09-22 04:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 08:06 [pgAdmin][RM5845] Free query windows hard capped to 1000 results sometimes Aditya Toshniwal <[email protected]>
2020-09-22 04:17 ` Akshay Joshi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox