Postgres 9.3 added a new DDLs for supporting MATERIALIZED VIEWS object. To support we need to create the tree nodes, extraction & scripting of the objects and add the object type to the object search tool.
To create a MATERIALIZED VIEW, use the below SQL to first create the table and then the mat view based on the table:
1. CREATE TABLE matviews (
3. They also added EVENT TRIGGERS. would need to create a tree node, extraction and scripting of this object as well.
|
169 KB
|
131 KB
|
220 KB
|
83 KB
|
94 KB
|
136 KB
|
108 KB
|
127 KB
|
167 KB
|
90 KB
|
124 KB
|
83 KB
|
140 KB
|
148 KB
![]() |
18 KB
will add the following:
a.) Materialized Views Tree Node -- complete
b.) Materialized Views extraction code -- complete
c.) Materialized Views scripting code -- complete
d.) Materialized Views will be added to auto completion -- Currently Not Supported
e.) Materialized View support to Schema Object script generator & Multi-Object Scripting -- complete
f.) Materialized View to Object Search: [Object Names] & [Column Names] -- complete
g.) Materialized View Detail View -- complete
h.) Server Connections Filter Type -- complete
i.) SQL syntax coloring for support keywords to editors -- completK.
j.) Add materialized views to query builder -- Currently Not Supported
initial support for postgresql materialized view is now implemented.
initial support for postgresql materialized view is now implemented.
In ADS 17.0.0-ga-4,
Issue -1 :
java.lang.NullPointerException occurs if we try to script materialized View and if Select Materialized Views in 'Schema Script Generator' and 'Schema Compare' windows.
Steps to reproduce the issue :
1) Connect to PostgreSQL 9.4.2 DB.
2) Create below Table in any schema.
CREATE TABLE "invoice" (
invoice_no integer PRIMARY KEY,
seller_no integer, -- ID of salesperson
invoice_date date, -- date of sale
invoice_amt numeric(13,2) -- amount of sale
);
3) Create a Materialized View on table 'invoice' :
CREATE MATERIALIZED VIEW "sales_summary" AS
SELECT
seller_no,
invoice_date,
sum(invoice_amt)::numeric(13,2) as sales_amt
FROM invoice
WHERE invoice_date < CURRENT_DATE
GROUP BY
seller_no,
invoice_date
ORDER BY
seller_no,
invoice_date;
4) Create a Index on it.
CREATE UNIQUE INDEX "sales_summary_seller"
ON "sales_summary" (seller_no, invoice_date);
5) Go to "Materialized Views" tree node -> Right click on Created Materialized View -> Select "Script Object to Windows As - > CREATE/DROP" option.
Actual Result : A pop-up appears with java.lang.NullPointerException.
java.lang.NullPointerException
at \\.\\.\\हिñçêČάй語简�?한\\.Fꐆꐦꃩ⣒10char.v(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.Fꐆꐦꃩ⣒10char.Q(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.hꌜ⢥ꃍᡞ.a(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.hꌜ⢥ꃍᡞ.a(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.i⢲ᛒꇔ⡋2.a(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.tꍑᚵꃌꍉenumBoolean.a(Unknown Source)
at com.aquafold.datastudio.mainframe.ActionHandler.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:724)
at java.awt.EventQueue$4.run(EventQueue.java:722)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:721)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Same exception occurs when we select "MAterialized Views" in "Schema script Generator" and "Schema Compare' window.
When we try to Script Multiple Materialized Views same exception occurs.
Please refer attached screen-shots "13126_Script_MV.png" , "13126_Schema Script Generator.png" and "13126_Schema Compare.png".
Issue -2 : Materialized Views are not displayed in Detail Pane.
Select "Materialized Views" tree node.
In Detail Pane list of materialized views is not displayed.
Please refer attached screen-shot "13126_Detail Pane.png".
In ADS 17.0.0-ga-4,
Issue -1 :
java.lang.NullPointerException occurs if we try to script materialized View and if Select Materialized Views in 'Schema Script Generator' and 'Schema Compare' windows.
Steps to reproduce the issue :
1) Connect to PostgreSQL 9.4.2 DB.
2) Create below Table in any schema.
CREATE TABLE "invoice" (
invoice_no integer PRIMARY KEY,
seller_no integer, -- ID of salesperson
invoice_date date, -- date of sale
invoice_amt numeric(13,2) -- amount of sale
);
3) Create a Materialized View on table 'invoice' :
CREATE MATERIALIZED VIEW "sales_summary" AS
SELECT
seller_no,
invoice_date,
sum(invoice_amt)::numeric(13,2) as sales_amt
FROM invoice
WHERE invoice_date < CURRENT_DATE
GROUP BY
seller_no,
invoice_date
ORDER BY
seller_no,
invoice_date;
4) Create a Index on it.
CREATE UNIQUE INDEX "sales_summary_seller"
ON "sales_summary" (seller_no, invoice_date);
5) Go to "Materialized Views" tree node -> Right click on Created Materialized View -> Select "Script Object to Windows As - > CREATE/DROP" option.
Actual Result : A pop-up appears with java.lang.NullPointerException.
java.lang.NullPointerException
at \\.\\.\\हिñçêČάй語简�?한\\.Fꐆꐦꃩ⣒10char.v(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.Fꐆꐦꃩ⣒10char.Q(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.hꌜ⢥ꃍᡞ.a(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.hꌜ⢥ꃍᡞ.a(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.i⢲ᛒꇔ⡋2.a(Unknown Source)
at \\.\\.\\हिñçêČάй語简�?한\\.tꍑᚵꃌꍉenumBoolean.a(Unknown Source)
at com.aquafold.datastudio.mainframe.ActionHandler.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:724)
at java.awt.EventQueue$4.run(EventQueue.java:722)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:721)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Same exception occurs when we select "MAterialized Views" in "Schema script Generator" and "Schema Compare' window.
When we try to Script Multiple Materialized Views same exception occurs.
Please refer attached screen-shots "13126_Script_MV.png" , "13126_Schema Script Generator.png" and "13126_Schema Compare.png".
Issue -2 : Materialized Views are not displayed in Detail Pane.
Select "Materialized Views" tree node.
In Detail Pane list of materialized views is not displayed.
Please refer attached screen-shot "13126_Detail Pane.png".
Certain elements of the object require string manipulation and we needed to check to make sure the object was not null before attempting to work with it. issue resolved.
Certain elements of the object require string manipulation and we needed to check to make sure the object was not null before attempting to work with it. issue resolved.
Verified in ADS17.0.0-ga-5.
Verified for below options :
a.) Materialized Views Tree Node
b.) Materialized Views extraction code
Refer attached screen-shot "13126_ADS17-ga-5_Tree node.png".
c.) Materialized Views scripting code
Refer attached screen-shot "13126_ADS17-ga-5_Scripting.png".
e.) Materialized View support to Schema Object script generator & Multi-Object Scripting
Refer attached screen-shot "13126_ADS17-ga-5_SchemaScriptGenerator.png" and "13126_ADS17-ga-5_MultipleObjectScripting.png".
f.) Materialized View to Object Search: [Object Names] & [Column Names]
Refer attached screen-shot "13126_ADS17-ga-7_Object Search.png".
g.) Materialized View Detail View
Refer attached screen-shot "13126_ADS17-ga-7_Detail Pane.png".
h.) Server Connections Filter Type
Refer attached screen-shot "13126_ADS17-ga-7_ServerConnection_Filters.png" and "13126_ADS17-ga-7_ServerConnection_SecondaryFilter.png"
i.) SQL syntax coloring for support keywords to editors
Refer attached screen-shot "13126_ADS17-ga-7_Keywords.png".
For all test cases of Materialized views please refer attached "Test cases.xlsx" file.
Verified in ADS17.0.0-ga-5.
Verified for below options :
a.) Materialized Views Tree Node
b.) Materialized Views extraction code
Refer attached screen-shot "13126_ADS17-ga-5_Tree node.png".
c.) Materialized Views scripting code
Refer attached screen-shot "13126_ADS17-ga-5_Scripting.png".
e.) Materialized View support to Schema Object script generator & Multi-Object Scripting
Refer attached screen-shot "13126_ADS17-ga-5_SchemaScriptGenerator.png" and "13126_ADS17-ga-5_MultipleObjectScripting.png".
f.) Materialized View to Object Search: [Object Names] & [Column Names]
Refer attached screen-shot "13126_ADS17-ga-7_Object Search.png".
g.) Materialized View Detail View
Refer attached screen-shot "13126_ADS17-ga-7_Detail Pane.png".
h.) Server Connections Filter Type
Refer attached screen-shot "13126_ADS17-ga-7_ServerConnection_Filters.png" and "13126_ADS17-ga-7_ServerConnection_SecondaryFilter.png"
i.) SQL syntax coloring for support keywords to editors
Refer attached screen-shot "13126_ADS17-ga-7_Keywords.png".
For all test cases of Materialized views please refer attached "Test cases.xlsx" file.
Issue #13126 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v17.0.0-ga-5, v18.0.0-dev-31 |
No time estimate |
will add the following:
a.) Materialized Views Tree Node -- complete
b.) Materialized Views extraction code -- complete
c.) Materialized Views scripting code -- complete
d.) Materialized Views will be added to auto completion -- Currently Not Supported
e.) Materialized View support to Schema Object script generator & Multi-Object Scripting -- complete
f.) Materialized View to Object Search: [Object Names] & [Column Names] -- complete
g.) Materialized View Detail View -- complete
h.) Server Connections Filter Type -- complete
i.) SQL syntax coloring for support keywords to editors -- completK.
j.) Add materialized views to query builder -- Currently Not Supported