Re: [PATCHES] --describe-config crashes

2008-03-02 Thread Bruce Momjian
Tom Lane wrote:
> Zdenek Kotala <[EMAIL PROTECTED]> writes:
> > Function printMixedStruct calls printf with NULL argument. It causes 
> > segmentation fault. Please, apply it for 8.3 - 8.1 too.
> 
> Ugh, I guess we've only tested --describe-config on platforms where
> %s treats a NULL pointer the same as an empty string.
> 
> Since that's also effectively the way GUC handles it, I'm inclined
> to think we should print NULL as "" not "(NULL)".  Otherwise,
> will apply.

Tom has applied this patch to CVS HEAD and all relevant back-branches.

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>http://momjian.us
  EnterpriseDB http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
Help/Unsubscribe/Update your Subscription:
http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-patches


Re: [PATCHES] --describe-config crashes

2008-02-21 Thread Tom Lane
Zdenek Kotala <[EMAIL PROTECTED]> writes:
> Function printMixedStruct calls printf with NULL argument. It causes 
> segmentation fault. Please, apply it for 8.3 - 8.1 too.

Ugh, I guess we've only tested --describe-config on platforms where
%s treats a NULL pointer the same as an empty string.

Since that's also effectively the way GUC handles it, I'm inclined
to think we should print NULL as "" not "(NULL)".  Otherwise,
will apply.

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[PATCHES] --describe-config crashes

2008-02-21 Thread Zdenek Kotala
Function printMixedStruct calls printf with NULL argument. It causes 
segmentation fault. Please, apply it for 8.3 - 8.1 too.


thanks Zdenek
Index: src/backend/utils/misc/help_config.c
===
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/utils/misc/help_config.c,v
retrieving revision 1.19
diff -c -r1.19 help_config.c
*** src/backend/utils/misc/help_config.c	1 Jan 2008 19:45:54 -	1.19
--- src/backend/utils/misc/help_config.c	21 Feb 2008 17:48:00 -
***
*** 117,123 
  
  		case PGC_STRING:
  			printf("STRING\t%s\t\t\t",
!    structToPrint->string.boot_val);
  			break;
  
  		default:
--- 117,123 
  
  		case PGC_STRING:
  			printf("STRING\t%s\t\t\t",
!    (structToPrint->string.boot_val == NULL) ? "(NULL)" : structToPrint->string.boot_val);
  			break;
  
  		default:

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly