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

Started by Martijn van Oosterhoutabout 20 years ago3 messages
#1Martijn van Oosterhout
kleptog@svana.org

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/

Show quoted text

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.

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Martijn van Oosterhout (#1)
Re: The use of (mb)print.c from psql in the scripts directory

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, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Martijn van Oosterhout (#1)
Re: The use of (mb)print.c from psql in the scripts directory

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