Re: Moved simple_prompt()/sprompt.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Moved simple_prompt()/sprompt.c
Date
Msg-id 26722.1060356431@sss.pgh.pa.us
Whole thread Raw
In response to Re: Moved simple_prompt()/sprompt.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Moved simple_prompt()/sprompt.c
List pgsql-hackers
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.

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.)

> 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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposed macros for error fields
Next
From: Tom Lane
Date:
Subject: Re: consistency check on SPI tuple count failed