Re: Server order - Mailing list pgadmin-support

From Guillaume Lelarge
Subject Re: Server order
Date
Msg-id 46559772.9080204@lelarge.info
Whole thread Raw
In response to Re: Server order  (Dave Page <dpage@postgresql.org>)
Responses Re: Server order
List pgadmin-support
Dave Page a écrit :
> [...]
> BTW; did you fix that SQL formatting error that Erwin reported?
>

Here is the patch that fixes it.

Regards.


--
Guillaume.
<!-- http://abs.traduc.org/
     http://lfs.traduc.org/
     http://docs.postgresqlfr.org/ -->
Index: pgadmin/schema/pgTable.cpp
===================================================================
--- pgadmin/schema/pgTable.cpp    (révision 6321)
+++ pgadmin/schema/pgTable.cpp    (copie de travail)
@@ -248,32 +248,32 @@
         if (!prevComment.IsEmpty())
             sql += wxT(" -- ") + firstLineOnly(prevComment);

-        sql += wxT("\n)\n");
+        sql += wxT("\n)");
         if (GetInheritedTableCount())
         {
-            sql += wxT("INHERITS (") + GetQuotedInheritedTables() + wxT(")\n");
+            sql += wxT("\nINHERITS (") + GetQuotedInheritedTables() + wxT(")");
         }

         if (GetConnection()->BackendMinimumVersion(8, 2))
         {
-            sql += wxT("WITH (");
+            sql += wxT("\nWITH (");
             if (GetFillFactor().Length() > 0)
                 sql += wxT("FILLFACTOR=") + GetFillFactor() + wxT(", ");
             if (GetHasOids())
                 sql +=  wxT("OIDS=TRUE");
             else
                 sql +=  wxT("OIDS=FALSE");
-            sql += wxT(")\n");
+            sql += wxT(")");
         }
         else
         {
             if (GetHasOids())
-                sql +=  wxT("WITH OIDS\n");
+                sql +=  wxT("\nWITH OIDS");
             else
-                sql +=  wxT("WITHOUT OIDS\n");
+                sql +=  wxT("\nWITHOUT OIDS");
         }

-        AppendIfFilled(sql, wxT(" TABLESPACE "), qtIdent(tablespace));
+        AppendIfFilled(sql, wxT("\nTABLESPACE "), qtIdent(tablespace));

         sql += wxT(";\n")
             + GetOwnerSql(7, 3);

pgadmin-support by date:

Previous
From: Laurent ROCHE
Date:
Subject: Feature Request: Rename DB in pgAdmin
Next
From: Guillaume Lelarge
Date:
Subject: Re: List to Father Christmas