Thread: Syntax error on Change of Materialized View definition

Syntax error on Change of Materialized View definition

From
Matthew Syphus
Date:
<div class="WordSection1"><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">I
noticedthat when changing the query definition of a Materialized View (using the view Properties > Definition tab),
italways generates an error:<br /><br /></span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Anerror has occurred:</span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">ERROR:syntax error at or near “)”</span><p
class="MsoNormal"><spanstyle="font-size:10.0pt;font-family:"Arial","sans-serif"">LINE 3: )</span><p
class="MsoNormal"><spanstyle="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Thisappears to be due to the addition of the following to the
SQLstatement:<br /> WITH (</span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">)</span><pclass="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><pclass="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Afterunchecking “Read Only” and deleting the above text, it
worksfine.  It happens on any materialized view I’ve tried (several) and seemingly with any change to the definition
(noother changes).  </span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><pclass="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Version1.22.0</span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Postgres9.5.1</span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Windows7 64-bit</span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><pclass="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Thankyou.</span></div>