      <sect2>
	<title>Long Transactions support</title>

	<para>
This module and associated pl/pgsql functions have been implemented
to provide long locking support required by
<ulink url="https://portal.opengeospatial.org/files/?artifact_id=7176">Web Feature Service</ulink> specification.
	</para>

          <note>
	  <para>
  Users must use <ulink url="http://www.postgresql.org/docs/7.4/static/transaction-iso.html">serializable transaction level</ulink> otherwise locking mechanism would break.
	  </para>
	  </note>

	  <variablelist>

        <varlistentry id="EnableLongTransactions">
          <term>EnableLongTransactions()</term>
          <listitem>
            <para>
		Enable long transaction support. This function creates the
		required metadata tables, needs to be called once before
		using the other functions in this section. Calling it twice
		is harmless.
	    </para>
		<para>
		    Availability: 1.1.3
		</para>
          </listitem>
        </varlistentry>

        <varlistentry id="DisableLongTransactions">
          <term>DisableLongTransactions()</term>
          <listitem>
            <para>
		Disable long transaction support. This function removes the
		long transaction support metadata tables, and drops all
		triggers attached to lock-checked tables.
	    </para>
		<para>
		    Availability: 1.1.3
		</para>
          </listitem>
        </varlistentry>

        <varlistentry id="CheckAuth">
          <term>CheckAuth([&lt;schema&gt;], &lt;table&gt;, &lt;rowid_col&gt;)</term>
          <listitem>
            <para>
		Check updates and deletes of rows in
		given table for being authorized.
		Identify rows using &lt;rowid_col&gt; column.
	    </para>
		<para>
		    Availability: 1.1.3
		</para>
          </listitem>
        </varlistentry>

        <varlistentry id="LockRow">
          <term>LockRow([&lt;schema&gt;], &lt;table&gt;, &lt;rowid&gt;, &lt;authid&gt;, [&lt;expires&gt;])</term>
          <listitem>
            <para>
	Set lock/authorization for specific row in table
	&lt;authid&gt; is a text value, &lt;expires&gt; is a timestamp
	defaulting to now()+1hour.
	Returns 1 if lock has been assigned, 0 otherwise
	(already locked by other auth)
	    </para>
		<para>
		    Availability: 1.1.3
		</para>
          </listitem>
        </varlistentry>

        <varlistentry id="UnlockRows">
          <term>UnlockRows(&lt;authid&gt;)</term>
          <listitem>
            <para>
	Remove all locks held by specified authorization id.
	Returns the number of locks released.
	    </para>
		<para>
		    Availability: 1.1.3
		</para>
          </listitem>
        </varlistentry>

        <varlistentry id="AddAuth">
          <term>AddAuth(&lt;authid&gt;)</term>
          <listitem>
            <para>
	Add an authorization token to be used in current
	transaction. 
	    </para>
		<para>
		    Availability: 1.1.3
		</para>
          </listitem>
        </varlistentry>

	  </variablelist>
      </sect2>


