Re: psql: add \pset true/false

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: michael(dot)paquier(at)gmail(dot)com
Cc: Jim(dot)Nasby(at)bluetreble(dot)com, peter_e(at)gmx(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us, marko(at)joh(dot)to, daniel(at)manitou-mail(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql: add \pset true/false
Date: 2015-12-04 08:37:54
Message-ID: 20151204.173754.108670760.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, I think this is the my last proposal of an idea on
psql-side generic solution. Sorry for bothering.

> My environment is CentOS7. But completely forgot Windows
> environment (or other platforms). I agree with you. It will
> indeed too much considering all possible platforms.

Ok, DLL is not practical since it would not only be rather
complex considering multi platform but used only by this feature
and no other user of DLL is not in sight. It's convincing enough
for me.

Then, how about calling subprocess for purpose? popen() looks to
be platform-independent so it is available to call arbitrary
external programs or scripts.

There are several obvious problems on this.

- Tremendously slow since this executes the program for every value.

- Dangerous in some aspect. Setting it by environment variable
is too dengerous but I'm not confidento whether settig by
\pset is safer as acceptable.

Is it still too complex? Or too slow?

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
psql_column_filter.diff text/x-patch 5.2 KB
unknown_filename text/plain 240 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2015-12-04 08:48:55 Re: proposal: add 'waiting for replication' to pg_stat_activity.state
Previous Message Andres Freund 2015-12-04 08:10:19 Re: Error with index on unlogged table