title: Can I create an email for the user based on input for the first and last name using postgreSQL?
body: <p>I am pretty new to Postgres, and I am making a mock database that manages students for a university so I can get a better understanding of how Postgres works.</p>
  <p>I am creating a student table that has columns for student id, enrollment date, grad year, first/last name, and a university email address. At the moment I just have the email column set to NOT NULL and the user has to enter their own email address, but clearly this is not how email addresses at a university work.</p>
  <p>I was wondering if there was a way to make the email be created dynamically based off of what the user inputs as their first and last name. For example, if I were to run the following query:</p>
  <pre><code>INSERT INTO students (first_name, last_name) VALUES ('bob', 'smith');
  </code></pre>
  <p>An email address would be created on the fly for bob smith in the format 'bobsmith@university.com', so my table would look like:</p>
  <pre><code> student_id | enrollment_date | grad_year |             email              | student_first | student_last 
  ------------+-----------------+-----------+--------------------------------+---------------+--------------
            2 | 2020-12-28      |    2024   |     bobsmith@university.com    |      bob      | smith
  </code></pre>
  <p>Is there a way that I can create a function that takes the values from the student_first and student_last columns and create an email based on them?</p>
  <p>Any links to readable documentation would be useful.</p>