SVN Commit by dpage: r4904 - in trunk/pgadmin3: . src/dlg

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by dpage: r4904 - in trunk/pgadmin3: . src/dlg
Date: 2006-01-17 12:44:12
Message-ID: 200601171244.k0HCiCBL025976@developer.pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Author: dpage
Date: 2006-01-17 12:44:12 +0000 (Tue, 17 Jan 2006)
New Revision: 4904

Modified:
trunk/pgadmin3/CHANGELOG.txt
trunk/pgadmin3/src/dlg/dlgFunction.cpp
Log:
Allow set returning functions to be created.

Modified: trunk/pgadmin3/CHANGELOG.txt
===================================================================
--- trunk/pgadmin3/CHANGELOG.txt 2006-01-17 12:43:10 UTC (rev 4903)
+++ trunk/pgadmin3/CHANGELOG.txt 2006-01-17 12:44:12 UTC (rev 4904)
@@ -18,7 +18,8 @@
</ul>
<br>
<ul>
- <LI>2006-01-17 DP 1.4.2 Display the defintion of set returning procedures correctly.
+ <li>2006-01-17 DP Allow set returning functions to be created.
+ <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-11 DP Allow result copy quoting configuration to be set explicitly rather than using the result export settings [Magnus Hagander]

Modified: trunk/pgadmin3/src/dlg/dlgFunction.cpp
===================================================================
--- trunk/pgadmin3/src/dlg/dlgFunction.cpp 2006-01-17 12:43:10 UTC (rev 4903)
+++ trunk/pgadmin3/src/dlg/dlgFunction.cpp 2006-01-17 12:44:12 UTC (rev 4904)
@@ -166,7 +166,6 @@
}
stReturntype->Hide();
cbReturntype->Hide();
- chkSetof->Hide();
}
else
{
@@ -622,21 +621,38 @@
{
if (!connection->EdbMinimumVersion(8, 0))
{
- bool hasOut=false;
+ int outParams=0;
+ wxString setType;

int i;
for (i=0 ; i < lstArguments->GetItemCount() ; i++)
{
if (GetDirection(lstArguments->GetText(i)) > 0)
{
- hasOut=true;
- break;
+ setType = lstArguments->GetText(i, typeColNo);
+ outParams++;
}
}

- if (!hasOut)
+ if (outParams == 0)
sql += wxT(" RETURNS void");
+ else
+ {
+ if (chkSetof->GetValue())
+ {
+ if (outParams == 1)
+ {
+ sql += wxT(" RETURNS SETOF ") + setType;
+ }
+ else
+ {
+ sql += wxT(" RETURNS SETOF record");
+ }
+ }
+ }
+
}
+
}
else
{

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2006-01-17 12:51:52 SVN Commit by dpage: r4905 - in branches/REL-1_4_0_PATCHES/pgadmin3: . src/schema
Previous Message svn 2006-01-17 12:43:11 SVN Commit by dpage: r4903 - in trunk/pgadmin3: . src/schema