Re: Moved simple_prompt()/sprompt.c
От | Bruce Momjian |
---|---|
Тема | Re: Moved simple_prompt()/sprompt.c |
Дата | |
Msg-id | 200308082058.h78KwTZ21183@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Moved simple_prompt()/sprompt.c (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Yes, thread.c, path.c, and sprompt.c should be in utils, but how do I do > > that? Utils seems to be a place things are pulled from, rather than a > > library that goes with every link. > > > Is it worth creating another library that acts just like /port but is > > called utils, or should we just rename the directory to portutils? > > path.c is arguably okay material for /port, since it is dealing with > platform-to-platform variations. > > sprompt.c is only going to be used by stuff under src/bin. I wonder if > we should create a src/bin/utils directory. I found it used by two contrib modules. I just removed the old duplicate code because they are already linking with pgport. For this reason, src/bin/utils is looking worse, so perhaps we should be looking at /utils and creating a libpgutils library like pgport for 7.5. > Not sure about thread.c --- perhaps we could just dump it into libpq. > (libpq requires it anyway, no? So why not export it from there and let > the apps atop libpq use the same instance.) Yes, libpq would probably be best until we find someone else who needs it. > > I am looking to move fmtId() over to port too so psql can use it. It is > > already used by pg_dump, and /scripts. > > That's definitely not port/ material. A src/bin/utils/ directory would > make sense for it though. I am thinking of just leaving fmtId() in /pg_dump and symlinking from there as /scripts does. It is pretty specific. fmtId() actually links in /src/backend/parser/keywords.o, so it is a really wild function. If we put fmtId() in a library, we would need to put keywords.o in there too, and that is just too weird, and a dependency mess. -- 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, Pennsylvania19073
В списке pgsql-hackers по дате отправления: