public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sander Eikelenboom <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [PATCH] Fix error on displaying table properties of a table partitioned by list having a default partition.
Date: Mon, 13 May 2019 10:58:55 +0200
Message-ID: <[email protected]> (raw)
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(
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH] Fix error on displaying table properties of a table partitioned by list having a default partition.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox