<p>I have found problem. <code>DROP FUNCTION</code> does not work</p>
<p>PostgreSQL requires parameters should be specified. This is copy/paste from <code>create_procedure</code></p>
<pre><code>git diff -b -w --ignore-blank-lines lib/SQL/Translator/Producer/PostgreSQL.pm
diff --git a/lib/SQL/Translator/Producer/PostgreSQL.pm b/lib/SQL/Translator/Producer/PostgreSQL.pm
index 9f8f727..d1de659 100644
--- a/lib/SQL/Translator/Producer/PostgreSQL.pm
+++ b/lib/SQL/Translator/Producer/PostgreSQL.pm
@@ -763,6 +763,16 @@ sub drop_procedure {
     my $generator = _generator($options);
 
     my $out = "DROP FUNCTION " . $generator-&gt;quote($procedure-&gt;name);
+    $out .= ' (';
+    my @args = ();
+    foreach my $arg (@{$procedure-&gt;parameters}) {
+    $arg = {name =&gt; $arg} if ref($arg) ne 'HASH';
+    push @args, join(' ', map $arg-&gt;{$_},
+                          grep defined($arg-&gt;{$_}),
+                          qw/argmode name type/);
+    }
+    $out .= join(', ', @args);
+    $out .= ')';
 
     return $out;
 }
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/dbsrgits/sql-translator/issues/82#issuecomment-274266587">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AASeAuyRf9r2FI5S9V12QD727HCtQeASks5rUh0VgaJpZM4Isz-E">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AASeAr_ggLJn8jNQhP2YpxozhdJJga_uks5rUh0VgaJpZM4Isz-E.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/dbsrgits/sql-translator/issues/82#issuecomment-274266587"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/dbsrgits/sql-translator","title":"dbsrgits/sql-translator","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/dbsrgits/sql-translator"}},"updates":{"snippets":[{"icon":"PERSON","message":"@KES777 in #82: I have found problem. `DROP FUNCTION` does not work\r\n\r\nPostgreSQL requires parameters should be specified. This is copy/paste from `create_procedure`\r\n```\r\ngit diff -b -w --ignore-blank-lines lib/SQL/Translator/Producer/PostgreSQL.pm\r\ndiff --git a/lib/SQL/Translator/Producer/PostgreSQL.pm b/lib/SQL/Translator/Producer/PostgreSQL.pm\r\nindex 9f8f727..d1de659 100644\r\n--- a/lib/SQL/Translator/Producer/PostgreSQL.pm\r\n+++ b/lib/SQL/Translator/Producer/PostgreSQL.pm\r\n@@ -763,6 +763,16 @@ sub drop_procedure {\r\n     my $generator = _generator($options);\r\n \r\n     my $out = \"DROP FUNCTION \" . $generator-\u003equote($procedure-\u003ename);\r\n+    $out .= ' (';\r\n+    my @args = ();\r\n+    foreach my $arg (@{$procedure-\u003eparameters}) {\r\n+    $arg = {name =\u003e $arg} if ref($arg) ne 'HASH';\r\n+    push @args, join(' ', map $arg-\u003e{$_},\r\n+                          grep defined($arg-\u003e{$_}),\r\n+                          qw/argmode name type/);\r\n+    }\r\n+    $out .= join(', ', @args);\r\n+    $out .= ')';\r\n \r\n     return $out;\r\n }\r\n```\r\n"}],"action":{"name":"View Issue","url":"https://github.com/dbsrgits/sql-translator/issues/82#issuecomment-274266587"}}}</script>