On Thu, Jul 24, 2014 at 4:36 PM, Robert Haas <robertmh...@gmail.com> wrote:
>
> On Wed, Jul 23, 2014 at 5:48 PM, Fabrízio de Royes Mello
> <fabriziome...@gmail.com> wrote:
> >
> > On Thu, Apr 17, 2014 at 9:15 PM, Michael Paquier <
michael.paqu...@gmail.com>
> > wrote:
> >>
> >> On Fri, Apr 18, 2014 at 4:29 AM, Fabrízio de Royes Mello
> >> <fabriziome...@gmail.com> wrote:
> >> >
> >> > On Thu, Apr 17, 2014 at 12:46 PM, Bruce Momjian <br...@momjian.us>
> >> > wrote:
> >> >>
> >> >> On Thu, Apr 17, 2014 at 11:44:37AM -0400, Tom Lane wrote:
> >> >> > Bruce Momjian <br...@momjian.us> writes:
> >> >> > > The idea is that we only need quotes when there are odd
characters
> >> >> > > in
> >> >> > > the identifier.  We do that right now in some places, though I
> >> >> > > can't
> >> >> > > find them in pg_dump.  I know psql does that, see quote_ident().
> >> >> >
> >> >> > I think our general style rule is that identifiers embedded in
> >> >> > messages
> >> >> > are always double-quoted.  There's an exception for type names,
but
> >> >> > not otherwise.  You're confusing the message case with printing
SQL.
> >> >>
> >> >> OK.  I was unclear if a status _display_ was a message like an error
> >> >> message.
> >> >>
> >> >
> >> > The attached patch fix missing double-quoted in "dumping contents of
> >> > table.." message and add schema name to other messages:
> >> > - "reading indexes for table \"%s\".\"%s\"\n"
> >> > - "reading foreign key constraints for table \"%s\".\"%s\"\n"
> >> > - "reading triggers for table \"%s\".\"%s\"\n"
> >> >
> >> > - "finding the columns and types of table \"%s\".\"%s\"\n"
> >> > - "finding default expressions of table \"%s\".\"%s\"\n"
> >> > - "finding check constraints for table \"%s\".\"%s\"\n"
> >> Cool additions. There may be a more elegant way to check if namespace
> >> is NULL, but I couldn't come up with one myself. So patch may be fine.
> >>
> >
> > Hi all,
> >
> > I think this small patch was lost. There are something wrong?
>
> Did it get added to a CommitFest?
>
> I don't see it there.
>

Given this is a very small and simple patch I thought it's not necessary...

Added to the next CommitFest.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 3aebac8..5c34a63 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -713,8 +713,8 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
 					_becomeOwner(AH, te);
 					_selectOutputSchema(AH, te->namespace);
 
-					ahlog(AH, 1, "processing data for table \"%s\"\n",
-						  te->tag);
+					ahlog(AH, 1, "processing data for table \"%s\".\"%s\"\n",
+						  AH->currSchema, te->tag);
 
 					/*
 					 * In parallel restore, if we created the table earlier in
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 412f52f..3c7e88f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -1400,7 +1400,17 @@ dumpTableData_copy(Archive *fout, void *dcontext)
 	const char *column_list;
 
 	if (g_verbose)
-		write_msg(NULL, "dumping contents of table %s\n", classname);
+	{
+		/* Print namespace information if available */
+		if (tbinfo->dobj.namespace != NULL &&
+			tbinfo->dobj.namespace->dobj.name != NULL)
+			write_msg(NULL, "dumping contents of table \"%s\".\"%s\"\n",
+					  tbinfo->dobj.namespace->dobj.name,
+					  classname);
+		else
+			write_msg(NULL, "dumping contents of table \"%s\"\n",
+					  classname);
+	}
 
 	/*
 	 * Make sure we are in proper schema.  We will qualify the table name
@@ -5019,8 +5029,17 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
 			continue;
 
 		if (g_verbose)
-			write_msg(NULL, "reading indexes for table \"%s\"\n",
-					  tbinfo->dobj.name);
+		{
+			/* Print namespace information if available */
+			if (tbinfo->dobj.namespace != NULL &&
+				tbinfo->dobj.namespace->dobj.name != NULL)
+				write_msg(NULL, "reading indexes for table \"%s\".\"%s\"\n",
+						  tbinfo->dobj.namespace->dobj.name,
+						  tbinfo->dobj.name);
+			else
+				write_msg(NULL, "reading indexes for table \"%s\"\n",
+						  tbinfo->dobj.name);
+		}
 
 		/* Make sure we are in proper schema so indexdef is right */
 		selectSourceSchema(fout, tbinfo->dobj.namespace->dobj.name);
@@ -5385,8 +5404,17 @@ getConstraints(Archive *fout, TableInfo tblinfo[], int numTables)
 			continue;
 
 		if (g_verbose)
-			write_msg(NULL, "reading foreign key constraints for table \"%s\"\n",
-					  tbinfo->dobj.name);
+		{
+			/* Print namespace information if available */
+			if (tbinfo->dobj.namespace != NULL &&
+				tbinfo->dobj.namespace->dobj.name != NULL)
+				write_msg(NULL, "reading foreign key constraints for table \"%s\".\"%s\"\n",
+						  tbinfo->dobj.namespace->dobj.name,
+						  tbinfo->dobj.name);
+			else
+				write_msg(NULL, "reading foreign key constraints for table \"%s\"\n",
+						  tbinfo->dobj.name);
+		}
 
 		/*
 		 * select table schema to ensure constraint expr is qualified if
@@ -5723,8 +5751,17 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables)
 			continue;
 
 		if (g_verbose)
-			write_msg(NULL, "reading triggers for table \"%s\"\n",
-					  tbinfo->dobj.name);
+		{
+			/* Print namespace information if available */
+			if (tbinfo->dobj.namespace != NULL &&
+				tbinfo->dobj.namespace->dobj.name != NULL)
+				write_msg(NULL, "reading triggers for table \"%s\".\"%s\"\n",
+						  tbinfo->dobj.namespace->dobj.name,
+						  tbinfo->dobj.name);
+			else
+				write_msg(NULL, "reading triggers for table \"%s\"\n",
+						  tbinfo->dobj.name);
+		}
 
 		/*
 		 * select table schema to ensure regproc name is qualified if needed
@@ -6336,8 +6373,17 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
 		 * the output of an indexscan on pg_attribute_relid_attnum_index.
 		 */
 		if (g_verbose)
-			write_msg(NULL, "finding the columns and types of table \"%s\"\n",
-					  tbinfo->dobj.name);
+		{
+			/* Print namespace information if available */
+			if (tbinfo->dobj.namespace != NULL &&
+				tbinfo->dobj.namespace->dobj.name != NULL)
+				write_msg(NULL, "finding the columns and types of table \"%s\".\"%s\"\n",
+							  tbinfo->dobj.namespace->dobj.name,
+							  tbinfo->dobj.name);
+			else
+				write_msg(NULL, "finding the columns and types of table \"%s\"\n",
+						  tbinfo->dobj.name);
+		}
 
 		resetPQExpBuffer(q);
 
@@ -6548,8 +6594,17 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
 			int			numDefaults;
 
 			if (g_verbose)
-				write_msg(NULL, "finding default expressions of table \"%s\"\n",
-						  tbinfo->dobj.name);
+			{
+				/* Print namespace information if available */
+				if (tbinfo->dobj.namespace != NULL &&
+					tbinfo->dobj.namespace->dobj.name != NULL)
+					write_msg(NULL, "finding default expressions of table \"%s\".\"%s\"\n",
+								  tbinfo->dobj.namespace->dobj.name,
+								  tbinfo->dobj.name);
+				else
+					write_msg(NULL, "finding default expressions of table \"%s\"\n",
+							  tbinfo->dobj.name);
+			}
 
 			resetPQExpBuffer(q);
 			if (fout->remoteVersion >= 70300)
@@ -6672,8 +6727,17 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
 			int			numConstrs;
 
 			if (g_verbose)
-				write_msg(NULL, "finding check constraints for table \"%s\"\n",
-						  tbinfo->dobj.name);
+			{
+				/* Print namespace information if available */
+				if (tbinfo->dobj.namespace != NULL &&
+					tbinfo->dobj.namespace->dobj.name != NULL)
+					write_msg(NULL, "finding check constraints for table \"%s\".\"%s\"\n",
+								  tbinfo->dobj.namespace->dobj.name,
+								  tbinfo->dobj.name);
+				else
+					write_msg(NULL, "finding check constraints for table \"%s\"\n",
+							  tbinfo->dobj.name);
+			}
 
 			resetPQExpBuffer(q);
 			if (fout->remoteVersion >= 90200)
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to