Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> >> None of these are correct.  canonicalize_path is only intended for
> >> directory names not file names.  (I think the same problem applies
> >> to several of your GUC variable changes, too.)
> 
> > canonicalize_path changes \ to /, and trims the trailing slash. 
> 
> ... and probably breaks the GUC variables that represent search paths,
> rather than single file/directory names.  Certainly canonicalizing those
> values in toto will not have the desired effects; you'd need to
> canonicalize the path elements after they are extracted.

OK, the only GUC I saw that was a list was preload_libraries, and this
patch fixes that.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/utils/init/miscinit.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/init/miscinit.c,v
retrieving revision 1.128
diff -c -c -r1.128 miscinit.c
*** src/backend/utils/init/miscinit.c   11 Jul 2004 23:49:48 -0000      1.128
--- src/backend/utils/init/miscinit.c   12 Jul 2004 00:08:12 -0000
***************
*** 926,931 ****
--- 926,932 ----
                        funcname = NULL;
                }
  
+               canonicalize_path(filename);
                initfunc = (func_ptr) load_external_function(filename, funcname,
                                                                                       
                  true, NULL);
                if (initfunc)
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v
retrieving revision 1.217
diff -c -c -r1.217 guc.c
*** src/backend/utils/misc/guc.c        11 Jul 2004 23:49:51 -0000      1.217
--- src/backend/utils/misc/guc.c        12 Jul 2004 00:08:19 -0000
***************
*** 1557,1563 ****
                        GUC_LIST_INPUT | GUC_LIST_QUOTE
                },
                &preload_libraries_string,
!               "", assign_canonical_path, NULL
        },
  
        {
--- 1557,1563 ----
                        GUC_LIST_INPUT | GUC_LIST_QUOTE
                },
                &preload_libraries_string,
!               "", NULL, NULL
        },
  
        {
---------------------------(end of broadcast)---------------------------
TIP 3: 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

Reply via email to