Simple patch to report in log the schema name of the statement - Mailing list pgsql-patches

From Ferruccio Zamuner
Subject Simple patch to report in log the schema name of the statement
Date
Msg-id 46AFC9D8.4040704@diff.org
Whole thread Raw
Responses Re: Simple patch to report in log the schema name of the statement
List pgsql-patches
./src/backend/utils/error/elog.c
*** ./src/backend/utils/error/elog.c.orig       Wed Aug  1 00:48:55 2007
--- ./src/backend/utils/error/elog.c    Wed Aug  1 00:53:16 2007
***************
*** 68,74 ****
--- 68,76 ----
  #include "storage/ipc.h"
  #include "tcop/tcopprot.h"
  #include "utils/memutils.h"
+ #include "utils/guc.h"
  #include "utils/ps_status.h"
+ #include "catalog/namespace.h"


  /* Global variables */
***************
*** 1541,1546 ****
--- 1543,1552 ----
                        case '%':
                                appendStringInfoChar(buf, '%');
                                break;
+                       case 'S':
+                               if (namespace_search_path != NULL)
+                                   appendStringInfo(buf, "%s ",
namespace_search_path);
+                                 break;
                        default:
                                /* format error - ignore it */
                                break;
./src/backend/utils/misc/postgresql.conf.sample
*** ./src/backend/utils/misc/postgresql.conf.sample.orig        Sat Jan
20 22:42:06 2007
--- ./src/backend/utils/misc/postgresql.conf.sample     Wed Aug  1
01:38:16 2007
***************
*** 328,333 ****
--- 330,336 ----
                                        #   %c = session id
                                        #   %l = session line number
                                        #   %s = session start timestamp
+                                       #   %S = schema
                                        #   %x = transaction id
                                        #   %q = stop here in non-session
                                        #        processes


pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Export user visible function to make use of convert_to_scalar
Next
From: Tom Lane
Date:
Subject: Re: Export user visible function to make use of convert_to_scalar