title: How to call a stored procedure (not function) with INOUT parameter in PostgreSQL 13
body: <p>I have this stored procedure :</p>
  <pre><code>CREATE OR REPLACE PROCEDURE SP_ObtenerSecuencialFactura(INOUT p_secuencial INT)
  LANGUAGE PLPGSQL 
  AS 
  $$
  BEGIN
      SELECT MAX(&quot;CODIGOFACTURA&quot;) + 1 INTO p_secuencial FROM &quot;FACTURA&quot;;
      IF p_secuencial IS NULL THEN
          p_secuencial := 1;
      END IF;
  END
  $$
  </code></pre>
  <p>And the calling:</p>
  <pre><code>DECLARE secuencial INT;
  CALL SP_ObtenerSecuencialFactura(secuencial);
  RAISE NOTICE '%', secuencial;
  </code></pre>
  <p>But I get this error when I call that stored procedure:</p>
  <blockquote>
  <p>ERROR: syntax error at or near &quot;INT&quot;</p>
  <p>LINE 1: DECLARE secuencial INT;</p>
  </blockquote>
  <p>What's wrong? I was finding examples but only exist with functions.</p>