public inbox for [email protected]
help / color / mirror / Atom feed[PATCH] Fix error on displaying table properties of a table partitioned by list having a default partition.
2+ messages / 2 participants
[nested] [flat]
* [PATCH] Fix error on displaying table properties of a table partitioned by list having a default partition.
@ 2019-05-13 08:58 Sander Eikelenboom <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Sander Eikelenboom @ 2019-05-13 08:58 UTC (permalink / raw)
To: pgadmin-hackers
L.S.,
This patch fixes an error on displaying table properties of a table partitioned by list having a default partition.
This is an additional fix for bug #3938 which was missed in commit a9d964b5ca04bbe00bf5585d5c19bdfdf603c8a9.
--
Sander Eikelenboom
Attachments:
[text/x-patch] fix-table-properties-display.diff (1.8K, 2-fix-table-properties-display.diff)
download | inline diff:
commit 3d1a09a1b6bc0651801c91dae071bf8a19d61558
Author: Sander Eikelenboom <[email protected]>
Date: Mon May 13 10:51:10 2019 +0200
Fix error on displaying table properties of a table partitioned by list having a default partition.
This is an additional fix for bug #3938 which was missed in commit a9d964b5ca04bbe00bf5585d5c19bdfdf603c8a9.
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py
index 7815b325..dffec879 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py
@@ -2203,14 +2203,20 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
'is_default': is_default
})
elif data['partition_type'] == 'list':
- range_part = \
- row['partition_value'].split('FOR VALUES IN (')[1]
+ if row['partition_value'] == 'DEFAULT':
+ is_default = True
+ range_in = None
+ else:
+ range_part = row['partition_value'].split(
+ 'FOR VALUES IN (')[1]
+ range_in = range_part[:-1]
+ is_default = False
- range_in = range_part[:-1]
partitions.append({
'oid': row['oid'],
'partition_name': partition_name,
- 'values_in': range_in
+ 'values_in': range_in,
+ 'is_default': is_default
})
else:
range_part = row['partition_value'].split(
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [PATCH] Fix error on displaying table properties of a table partitioned by list having a default partition.
@ 2019-05-15 13:06 Akshay Joshi <[email protected]>
parent: Sander Eikelenboom <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2019-05-15 13:06 UTC (permalink / raw)
To: Sander Eikelenboom <[email protected]>; +Cc: pgadmin-hackers
Thanks patch applied.
On Mon, May 13, 2019 at 2:26 PM Sander Eikelenboom <[email protected]>
wrote:
> L.S.,
>
> This patch fixes an error on displaying table properties of a table
> partitioned by list having a default partition.
> This is an additional fix for bug #3938 which was missed in commit
> a9d964b5ca04bbe00bf5585d5c19bdfdf603c8a9.
>
> --
> Sander Eikelenboom
>
--
*Thanks & Regards*
*Akshay Joshi*
*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-05-15 13:06 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 08:58 [PATCH] Fix error on displaying table properties of a table partitioned by list having a default partition. Sander Eikelenboom <[email protected]>
2019-05-15 13:06 ` 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