Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html