Thread: The use of (mb)print.c from psql in the scripts directory

The use of (mb)print.c from psql in the scripts directory

From
Martijn van Oosterhout
Date:
Currently createlang and droplang use these two files mbprint.c and
print.c to access the function printQuery() just to handle the
displaying of the current languages. Is there any particular reason why
it can't be made to use the version in libpq?

In particular, does anyone really rely on the possibility of createlang
invoking your pager to display the list of languages? It really does,
you just have to make your terminal really small to see it.

The reason I'm asking is because I'm working on the interaction between
psql and the pager and keep running into issues w.r.t. createlang using
the same code.

Thanks in advance,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Re: The use of (mb)print.c from psql in the scripts directory

From
Bruce Momjian
Date:
Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> Currently createlang and droplang use these two files mbprint.c and
> print.c to access the function printQuery() just to handle the
> displaying of the current languages. Is there any particular reason why
> it can't be made to use the version in libpq?
> 
> In particular, does anyone really rely on the possibility of createlang
> invoking your pager to display the list of languages? It really does,
> you just have to make your terminal really small to see it.
> 
> The reason I'm asking is because I'm working on the interaction between
> psql and the pager and keep running into issues w.r.t. createlang using
> the same code.

Yea, I think it would be good to use libpq rather than grab from psql.

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


Re: The use of (mb)print.c from psql in the scripts directory

From
Tom Lane
Date:
Martijn van Oosterhout <kleptog@svana.org> writes:
> Currently createlang and droplang use these two files mbprint.c and
> print.c to access the function printQuery() just to handle the
> displaying of the current languages. Is there any particular reason why
> it can't be made to use the version in libpq?

I believe Peter had deliberately moved away from that, basically on the
grounds that we can't whack the behavior of libpq functions around every
five minutes, the way some people like to do with psql and our other
client programs (see nearby thread about \x ;-))
        regards, tom lane