title: liquibase postgresql creating functions
body: <p>I am using liquibase to create triggers for postgressql database. Below is the syntax which I use in liquibase </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
           http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"&gt;
  
      &lt;changeSet id="1" author="yc14ik1"&gt;
  
          &lt;createProcedure catalogName="cat" dbms="postgresql"
              encoding="utf8" procedureName="UPDATE_LAST_ROW_CHG_TS()" relativeToChangelogFile="true" schemaName="sub"&gt;
  
              CREATE OR REPLACE FUNCTION UPDATE_LAST_ROW_CHG_TS() RETURNS trigger
              LANGUAGE plpgsql
              AS $$
              BEGIN
                  NEW.LAST_ROW_CHG_TS = NOW();
                  RETURN NEW;
              END;
              $$;
  
          &lt;/createProcedure&gt;
  
  
          &lt;sql&gt;&lt;/sql&gt;
  &lt;/changeSet&gt;
  </code></pre>
  
  <p>When this procedure is executed in Jenkins Job, I get this error </p>
  
  <pre><code>Unexpected error running Liquibase: ERROR: language "plpgsql" does not exist
    Hint: Use CREATE LANGUAGE to load the language into the database. [Failed SQL: CREATE OR REPLACE FUNCTION UPDATE_LAST_ROW_CHG_TS() RETURNS trigger
              LANGUAGE plpgsql
              AS $$
              BEGIN
                  NEW.LAST_ROW_CHG_TS = NOW();
                  RETURN NEW;
              END;
              $$;]
  
  
  Build step 'Execute shell' marked build as failure
  Notifying upstream projects of job completion
  Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
  </code></pre>
  
  <p>Can some one help me how can I fix this problem ?</p>