title: Error when creating a generated column in Postgresql
body: <pre><code>CREATE TABLE Person (
     id  serial primary key,
     accNum  text UNIQUE GENERATED ALWAYS AS (
   concat(right(cast(extract year from current_date) as text), 2), cast(id as text)) STORED
  );
  </code></pre>
  <p><strong>Error:</strong> generation expression is not immutable</p>
  <p>The goal is to populate the accNum field with YYid where YY is the last two letters of the year when the person was added.</p>
  <p>I also tried the '||' operator but it was unsuccessful.</p>