title: Postgresql function update
body: <p>I have 2 tables : </p>
  
  <ol>
  <li><p>the first for the calendar with date, and open day (boolean)</p></li>
  <li><p>the second is a table of holidays. </p></li>
  </ol>
  
  <p>I made a function for change the status of open-day on the calendar :</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION add_hol ()
  RETURNS boolean AS
  UPDATE calendar SET open_day = 'false'
  WHERE day IN (
  SELECT jour FROM calendar AS c
  INNER JOIN calendar_hol AS h
  ON c.day=h.day_hol)
  LANGUAGE sql 
  </code></pre>
  
  <p>But have always the error message : </p>
  
  <blockquote>
    <p>syntax error at or near "UPDATE".</p>
  </blockquote>
  
  <p>How to correct this, please ? (i tried in a many ways, but with no results...)</p>