title: Where can functions appear in PostgreSQL?
body: <p>Given a function <code>xyz()</code> in PostgreSQL, where and how can I actually use it?</p>
  
  <p>Consider the function <code>current_database()</code> for example.
  I can perform the following queries then:</p>
  
  <pre><code>SELECT current_database();
  SELECT * FROM current_database();
  </code></pre>
  
  <p>And in this case both result in the output:</p>
  
  <pre><code> current_database
  ------------------
   cassava
  (1 row)
  </code></pre>
  
  <p>Are there any other places I can use this function?</p>
  
  <p><strong>In particular:</strong> how could I write the following, so that it works (because as it stands, it does not).</p>
  
  <pre><code>GRANT ALL ON DATABASE current_database() TO GROUP wheel WITH GRANT OPTION;
  </code></pre>