public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][patch] Partition node related fixes
6+ messages / 2 participants
[nested] [flat]
* [pgAdmin][patch] Partition node related fixes
@ 2021-10-06 06:54 Aditya Toshniwal <[email protected]>
2021-10-06 09:24 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Toshniwal @ 2021-10-06 06:54 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
Please review the attached patch which fixes:
1. Unable to create trigger for partition table. Fixes #6867.
2. Unable to create index, RLS policy, rules, triggers for partition. Fixes
#6868.
--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM6867_6868.patch (3.0K, 3-RM6867_6868.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
index 9c1b20ad9..73f8eda22 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
@@ -18,8 +18,8 @@ export function getColumnSchema(nodeObj, treeNodeInfo, itemNodeData) {
return new ColumnSchema(
{
columnList: ()=>getNodeListByName('column', treeNodeInfo, itemNodeData, {}),
- collationList: ()=>getNodeAjaxOptions('get_collations', nodeObj, treeNodeInfo, itemNodeData),
- opClassList: ()=>getNodeAjaxOptions('get_op_class', nodeObj, treeNodeInfo, itemNodeData)
+ collationList: ()=>getNodeAjaxOptions('get_collations', nodeObj, treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'}),
+ opClassList: ()=>getNodeAjaxOptions('get_op_class', nodeObj, treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'})
}, {
node_info: treeNodeInfo
}
@@ -481,4 +481,4 @@ export default class IndexSchema extends BaseUISchema {
}
return null;
}
-}
\ No newline at end of file
+}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
index 2067ce267..6d0a8db8c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
@@ -178,7 +178,7 @@ define('pgadmin.node.trigger', [
getSchema: function(treeNodeInfo, itemNodeData) {
return new TriggerSchema(
{
- triggerFunction: ()=>getNodeAjaxOptions('get_triggerfunctions', this, treeNodeInfo, itemNodeData, {cacheLevel: 'trigger_function'}, (data) => {
+ triggerFunction: ()=>getNodeAjaxOptions('get_triggerfunctions', this, treeNodeInfo, itemNodeData, {cacheLevel: 'trigger_function', jumpAfterNode: 'schema'}, (data) => {
return _.reject(data, function(option) {
return option.label == '';
});
diff --git a/web/pgadmin/browser/static/js/node_view.jsx b/web/pgadmin/browser/static/js/node_view.jsx
index c94928689..df1d8a240 100644
--- a/web/pgadmin/browser/static/js/node_view.jsx
+++ b/web/pgadmin/browser/static/js/node_view.jsx
@@ -70,7 +70,7 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo
/* Called when switched to SQL tab, promise required */
const getSQLValue = (isNew, changedData)=>{
- const msqlUrl = generateNodeUrl.call(nodeObj, treeNodeInfo, 'msql', itemNodeData, !isNew, null);
+ const msqlUrl = generateNodeUrl.call(nodeObj, treeNodeInfo, 'msql', itemNodeData, !isNew, nodeObj.url_jump_after_node);
return new Promise((resolve, reject)=>{
api({
url: msqlUrl,
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgAdmin][patch] Partition node related fixes
2021-10-06 06:54 [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
@ 2021-10-06 09:24 ` Akshay Joshi <[email protected]>
2021-10-06 11:07 ` Re: [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Akshay Joshi @ 2021-10-06 09:24 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks, the patch applied.
On Wed, Oct 6, 2021 at 12:25 PM Aditya Toshniwal <
[email protected]> wrote:
> Hi Hackers,
>
> Please review the attached patch which fixes:
> 1. Unable to create trigger for partition table. Fixes #6867.
> 2. Unable to create index, RLS policy, rules, triggers for partition.
> Fixes #6868.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Software Architect | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgAdmin][patch] Partition node related fixes
2021-10-06 06:54 [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 09:24 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
@ 2021-10-06 11:07 ` Aditya Toshniwal <[email protected]>
2021-10-06 11:30 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Toshniwal @ 2021-10-06 11:07 UTC (permalink / raw)
To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers
Hi Hackers,
The nodes index, RLS policy, rules, triggers are failing to save for
partitions. Please review the attached patch to fix the issue.
On Wed, Oct 6, 2021 at 2:54 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, the patch applied.
>
> On Wed, Oct 6, 2021 at 12:25 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Please review the attached patch which fixes:
>> 1. Unable to create trigger for partition table. Fixes #6867.
>> 2. Unable to create index, RLS policy, rules, triggers for partition.
>> Fixes #6868.
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>> <http://edbpostgres.com;
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM6868.part2.patch (2.6K, 3-RM6868.part2.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.js
index 2d1348305..917666161 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.js
@@ -158,7 +158,7 @@ define('pgadmin.node.index', [
tablespaceList: ()=>getNodeListByName('tablespace', treeNodeInfo, itemNodeData, {}, (m)=>{
return (m.label != 'pg_global');
}),
- amnameList : ()=>getNodeAjaxOptions('get_access_methods', nodeObj, treeNodeInfo, itemNodeData),
+ amnameList : ()=>getNodeAjaxOptions('get_access_methods', nodeObj, treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'}),
columnList: ()=>getNodeListByName('column', treeNodeInfo, itemNodeData, {}),
},
{
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
index 73f8eda22..5eab1b66f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js
@@ -263,7 +263,6 @@ export default class IndexSchema extends BaseUISchema {
readonly: function (state) {
return !indexSchemaObj.isNew(state);
},
- url_jump_after_node: 'schema',
group: gettext('Definition'),
type: () => {
return {
diff --git a/web/pgadmin/browser/static/js/node_view.jsx b/web/pgadmin/browser/static/js/node_view.jsx
index fbb922058..e67a500d8 100644
--- a/web/pgadmin/browser/static/js/node_view.jsx
+++ b/web/pgadmin/browser/static/js/node_view.jsx
@@ -25,7 +25,7 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo
let serverInfo = treeNodeInfo && ('server' in treeNodeInfo) &&
pgAdmin.Browser.serverInfo && pgAdmin.Browser.serverInfo[treeNodeInfo.server._id];
let inCatalog = treeNodeInfo && ('catalog' in treeNodeInfo);
- let urlBase = generateNodeUrl.call(nodeObj, treeNodeInfo, actionType, itemNodeData, false, null);
+ let urlBase = generateNodeUrl.call(nodeObj, treeNodeInfo, actionType, itemNodeData, false, nodeObj.url_jump_after_node);
const api = getApiInstance();
const url = (isNew)=>{
return urlBase + (isNew ? '' : itemNodeData._id);
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgAdmin][patch] Partition node related fixes
2021-10-06 06:54 [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 09:24 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
2021-10-06 11:07 ` Re: [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
@ 2021-10-06 11:30 ` Akshay Joshi <[email protected]>
2021-10-06 12:02 ` Re: [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Akshay Joshi @ 2021-10-06 11:30 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks, the patch applied.
On Wed, Oct 6, 2021 at 4:37 PM Aditya Toshniwal <
[email protected]> wrote:
> Hi Hackers,
>
> The nodes index, RLS policy, rules, triggers are failing to save for
> partitions. Please review the attached patch to fix the issue.
>
> On Wed, Oct 6, 2021 at 2:54 PM Akshay Joshi <[email protected]>
> wrote:
>
>> Thanks, the patch applied.
>>
>> On Wed, Oct 6, 2021 at 12:25 PM Aditya Toshniwal <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please review the attached patch which fixes:
>>> 1. Unable to create trigger for partition table. Fixes #6867.
>>> 2. Unable to create index, RLS policy, rules, triggers for partition.
>>> Fixes #6868.
>>>
>>> --
>>> Thanks,
>>> Aditya Toshniwal
>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>> <http://edbpostgres.com;
>>> "Don't Complain about Heat, Plant a TREE"
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres <http://edbpostgres.com>*
>>
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Software Architect | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgAdmin][patch] Partition node related fixes
2021-10-06 06:54 [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 09:24 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
2021-10-06 11:07 ` Re: [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 11:30 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
@ 2021-10-06 12:02 ` Aditya Toshniwal <[email protected]>
2021-10-06 12:21 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Toshniwal @ 2021-10-06 12:02 UTC (permalink / raw)
To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers
Hi Hackers,
Following the chain, attached patch fixes indexes not loading in Primary
constraint and Unique const dialog for partition.
On Wed, Oct 6, 2021 at 5:00 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, the patch applied.
>
> On Wed, Oct 6, 2021 at 4:37 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> The nodes index, RLS policy, rules, triggers are failing to save for
>> partitions. Please review the attached patch to fix the issue.
>>
>> On Wed, Oct 6, 2021 at 2:54 PM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Thanks, the patch applied.
>>>
>>> On Wed, Oct 6, 2021 at 12:25 PM Aditya Toshniwal <
>>> [email protected]> wrote:
>>>
>>>> Hi Hackers,
>>>>
>>>> Please review the attached patch which fixes:
>>>> 1. Unable to create trigger for partition table. Fixes #6867.
>>>> 2. Unable to create index, RLS policy, rules, triggers for partition.
>>>> Fixes #6868.
>>>>
>>>> --
>>>> Thanks,
>>>> Aditya Toshniwal
>>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>>> <http://edbpostgres.com;
>>>> "Don't Complain about Heat, Plant a TREE"
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Principal Software Architect*
>>> *EDB Postgres <http://edbpostgres.com>*
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>> <http://edbpostgres.com;
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM6868.part3.patch (2.0K, 3-RM6868.part3.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js
index 742f767cf..d786993dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/primary_key.js
@@ -105,7 +105,7 @@ define('pgadmin.node.primary_key', [
spcname: ()=>getNodeListByName('tablespace', treeNodeInfo, itemNodeData, {}, (m)=>{
return (m.label != 'pg_global');
}),
- index: ()=>getNodeListByName('index', treeNodeInfo, itemNodeData),
+ index: ()=>getNodeListByName('index', treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'}),
}, treeNodeInfo);
},
// Define the model for index constraint node
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js
index 7b2a8fe87..f24e06197 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/js/unique_constraint.js
@@ -91,7 +91,7 @@ define('pgadmin.node.unique_constraint', [
spcname: ()=>getNodeListByName('tablespace', treeNodeInfo, itemNodeData, {}, (m)=>{
return (m.label != 'pg_global');
}),
- index: ()=>getNodeListByName('index', treeNodeInfo, itemNodeData),
+ index: ()=>getNodeListByName('index', treeNodeInfo, itemNodeData, {jumpAfterNode: 'schema'}),
}, treeNodeInfo);
},
});
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [pgAdmin][patch] Partition node related fixes
2021-10-06 06:54 [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 09:24 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
2021-10-06 11:07 ` Re: [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 11:30 ` Re: [pgAdmin][patch] Partition node related fixes Akshay Joshi <[email protected]>
2021-10-06 12:02 ` Re: [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
@ 2021-10-06 12:21 ` Akshay Joshi <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Akshay Joshi @ 2021-10-06 12:21 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks, the patch applied.
On Wed, Oct 6, 2021 at 5:32 PM Aditya Toshniwal <
[email protected]> wrote:
> Hi Hackers,
>
> Following the chain, attached patch fixes indexes not loading in Primary
> constraint and Unique const dialog for partition.
>
> On Wed, Oct 6, 2021 at 5:00 PM Akshay Joshi <[email protected]>
> wrote:
>
>> Thanks, the patch applied.
>>
>> On Wed, Oct 6, 2021 at 4:37 PM Aditya Toshniwal <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> The nodes index, RLS policy, rules, triggers are failing to save for
>>> partitions. Please review the attached patch to fix the issue.
>>>
>>> On Wed, Oct 6, 2021 at 2:54 PM Akshay Joshi <
>>> [email protected]> wrote:
>>>
>>>> Thanks, the patch applied.
>>>>
>>>> On Wed, Oct 6, 2021 at 12:25 PM Aditya Toshniwal <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Hackers,
>>>>>
>>>>> Please review the attached patch which fixes:
>>>>> 1. Unable to create trigger for partition table. Fixes #6867.
>>>>> 2. Unable to create index, RLS policy, rules, triggers for partition.
>>>>> Fixes #6868.
>>>>>
>>>>> --
>>>>> Thanks,
>>>>> Aditya Toshniwal
>>>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>>>> <http://edbpostgres.com;
>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>
>>>>
>>>>
>>>> --
>>>> *Thanks & Regards*
>>>> *Akshay Joshi*
>>>> *pgAdmin Hacker | Principal Software Architect*
>>>> *EDB Postgres <http://edbpostgres.com>*
>>>>
>>>> *Mobile: +91 976-788-8246*
>>>>
>>>
>>>
>>> --
>>> Thanks,
>>> Aditya Toshniwal
>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>> <http://edbpostgres.com;
>>> "Don't Complain about Heat, Plant a TREE"
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres <http://edbpostgres.com>*
>>
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Software Architect | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-10-06 12:21 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 06:54 [pgAdmin][patch] Partition node related fixes Aditya Toshniwal <[email protected]>
2021-10-06 09:24 ` Akshay Joshi <[email protected]>
2021-10-06 11:07 ` Aditya Toshniwal <[email protected]>
2021-10-06 11:30 ` Akshay Joshi <[email protected]>
2021-10-06 12:02 ` Aditya Toshniwal <[email protected]>
2021-10-06 12:21 ` 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