From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | michael(dot)paquier(at)gmail(dot)com |
Cc: | pavel(dot)stehule(at)gmail(dot)com, 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-08 10:18:48 |
Message-ID: | 20151208.191848.107449384.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
At Sat, 5 Dec 2015 21:05:29 +0900, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote in <CAB7nPqSXcdM-5nFWDf8zuKmW8j_ooE6zYRqYQasp0fjKxKDX2A(at)mail(dot)gmail(dot)com>
> On Fri, Dec 4, 2015 at 6:06 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> > long time I am dream about integrating Lua to psql
> >
> > It is fast enough for these purpose and can be used for custom macros, ..
>
> Things are perhaps digressing too much here...
But is it another example of per-column pluggable filter? (I
cannot imagine a concrete usage scenario, though.)
> Regarding the patch, I
> would tend to think that we should just reject it and try to cruft
> something that could be more pluggable if there is really a need.
> Thoughts?
Honestly saying, I feel simlilaly with you:p I personally will do
something like the following for the original objective.
psql postgres -c 'select * from tb' | perl -ne 's/t/○/g,s/f/×/g if ($. > 2); print'
I think that almost everything of this kind of replacement can be
accomplised by post-filtering like this, especially with
a help of replacement of field separator.
I have shown how it looks that DLL and script/executables is used
for this purpose (the latter could be specified as command line
parameter but totally would be in same shape). The former looks
too complicated only for this purposr and the latter looks simple
but just peculiar. However, I doubt there's other measure simple
but clean way, and doubt that there's so many usage of pluggable
mechanism on psql.
Quite concise (and unseen) way of platform-independent DLL
loading may allow us to usr DLL for this purpose?
Or, separating platform-independent dll-loading stuff from
backend and share with frontend would allow this? (This could be
acceptable.)
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2015-12-08 10:26:38 | Re: Move PinBuffer and UnpinBuffer to atomics |
Previous Message | Andres Freund | 2015-12-08 10:04:35 | Re: Move PinBuffer and UnpinBuffer to atomics |