title: Error on create view with cast numeric as decimal on postgresql
body: <p>Good morning everyone!</p>
  
  <p>I currently work with postgresql. Well, I need to create views where the numeric columns stay rounded 15.3 but I'm encountering a problem I could not understand.</p>
  
  <p>The select work:</p>
  
  <pre><code>select cast(15.2547 as decimal(15,3)) as quantidade_medida_estatistica
  </code></pre>
  
  <p>The view not working:</p>
  
  <pre><code>create or replace view teste as select cast(15.2547 as decimal(15,3)) as quantidade_medida_estatistica
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>ERROR: can not change the data type of column view "quantidade_medida_estatistica" of numeric (15,4) to numeric (15,3)</p>
  </blockquote>
  
  <p>Thanks!</p>