SVN Commit by dpage: r4905 - in branches/REL-1_4_0_PATCHES/pgadmin3: . src/schema - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by dpage: r4905 - in branches/REL-1_4_0_PATCHES/pgadmin3: . src/schema
Date
Msg-id 200601171251.k0HCpqp7026055@developer.pgadmin.org
Whole thread Raw
List pgadmin-hackers
Author: dpage
Date: 2006-01-17 12:51:52 +0000 (Tue, 17 Jan 2006)
New Revision: 4905

Modified:
   branches/REL-1_4_0_PATCHES/pgadmin3/CHANGELOG.txt
   branches/REL-1_4_0_PATCHES/pgadmin3/src/schema/pgFunction.cpp
Log:
Display the defintion of set returning procedures correctly.

Modified: branches/REL-1_4_0_PATCHES/pgadmin3/CHANGELOG.txt
===================================================================
--- branches/REL-1_4_0_PATCHES/pgadmin3/CHANGELOG.txt    2006-01-17 12:44:12 UTC (rev 4904)
+++ branches/REL-1_4_0_PATCHES/pgadmin3/CHANGELOG.txt    2006-01-17 12:51:52 UTC (rev 4905)
@@ -18,6 +18,7 @@
 </ul>
 <br>
 <ul>
+    <li>2006-01-17 DP  1.4.2  Display the defintion of set returning procedures correctly.
     <li>2006-01-17 DP  1.4.2  Fix drop procedure by including IN/OUT parameter flags in the name.
     <li>2006-01-13 DP  1.4.2  Fix role SQL - correctly define CREATEROLE/NOCREATEROLE per Andrus.
     <li>2006-01-09 DP  1.4.2  Honour the copy quoting setting properly in the SQL results pane [Magnus Hagander]

Modified: branches/REL-1_4_0_PATCHES/pgadmin3/src/schema/pgFunction.cpp
===================================================================
--- branches/REL-1_4_0_PATCHES/pgadmin3/src/schema/pgFunction.cpp    2006-01-17 12:44:12 UTC (rev 4904)
+++ branches/REL-1_4_0_PATCHES/pgadmin3/src/schema/pgFunction.cpp    2006-01-17 12:51:52 UTC (rev 4905)
@@ -74,8 +74,13 @@
             sql += wxT("\n  RETURNS ");
             if (GetReturnAsSet())
                 sql += wxT("SETOF ");
-            sql +=GetQuotedReturnType();
+            sql += GetQuotedReturnType();
         }
+        else if (GetReturnAsSet())
+        {
+            sql += wxT("\n  RETURNS SETOF ");
+            sql += GetQuotedReturnType();
+        }

         sql += wxT(" AS\n");

@@ -155,8 +160,15 @@

         sql = wxT("-- Procedure: ") + GetQuotedFullIdentifier() + wxT("\n\n")
             + wxT("-- DROP PROCEDURE") + GetQuotedFullIdentifier() + wxT(";")
-            + wxT("\n\nCREATE OR REPLACE ") + qtName
-            + wxT(" AS\n")
+            + wxT("\n\nCREATE OR REPLACE ") + qtName;
+
+        if (GetReturnAsSet())
+        {
+            sql += wxT("\n  RETURNS SETOF ");
+            sql +=GetQuotedReturnType();
+        }
+
+        sql += wxT(" AS\n")
             + qtStringDollar(GetSource())
             + wxT(";\n");



pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r4904 - in trunk/pgadmin3: . src/dlg
Next
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r4906 - trunk/www