Re: pgsql-server: Use canonicalize_path for -D, GUC paths,
От | Bruce Momjian |
---|---|
Тема | Re: pgsql-server: Use canonicalize_path for -D, GUC paths, |
Дата | |
Msg-id | 200407120008.i6C08iF15879@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql-server: Use canonicalize_path for -D, GUC paths, and paths coming (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pgsql-server: Use canonicalize_path for -D, GUC paths,
|
Список | pgsql-committers |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> 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 pgman@candle.pha.pa.us | (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 }, {
В списке pgsql-committers по дате отправления: