*** src/backend/utils/error/elog.c.orig	2004-08-25 12:37:26.000000000 -0600
--- src/backend/utils/error/elog.c	2004-08-25 15:05:34.000000000 -0600
***************
*** 1347,1348 ****
--- 1347,1370 ----
  				break;
+ 			case 'm':
+ 				{
+ 					time_t stamp_time;
+ 					char strfbuf[128];
+ 					struct timeval tv;
+ 					struct timezone tz = {0, 0};
+ 
+ 					gettimeofday(&tv, &tz);
+  					stamp_time = tv.tv_sec;
+ 
+ 					/* leave room for milliseconds... */
+ 					strftime(strfbuf, sizeof(strfbuf),
+ 						"%Y-%m-%d %H:%M:%S     %Z",
+ 						localtime(&stamp_time));
+ 
+ 					/* 'paste' milliseconds into place... */
+  					sprintf(strfbuf+19, ".%03d", 
+ 						(int)(tv.tv_usec/1000));
+ 
+ 					appendStringInfoString(buf, strfbuf);
+ 				}
+ 				break;
  			case 't':
***************
*** 1394,1395 ****
--- 1416,1430 ----
  				}
+ 			case 'h':
+ 				if (MyProcPort)
+ 				{
+ 					appendStringInfo(buf, "%s", MyProcPort->remote_host);
+ 				}
+ 				break;
+ 			case 'P':
+ 				if (MyProcPort)
+ 				{
+ 					if (strlen(MyProcPort->remote_port) > 0)
+ 						appendStringInfo(buf, "%s",
+ 										 MyProcPort->remote_port);
+ 				}
  				break;
