On 2016-05-25 21:13, Tom Lane wrote:
Assuming this patch withstands more careful review, we will need to think
about project policy for how/when to apply such fixes.

I discovered yesterday that Bruce Evans had done the fix for sizeof in their fork of indent(1) in 2004 (r125623 [1]). The core fix is exactly the same as mine, he just did more fixes around it, which I haven't analyzed.

I'm trying to see if FreeBSD indent can successfully do pg_bsd_indent's job. So far I had to fix one thing, which is not adding a space after a cast operator, for which they added no option to turn it off. Currently I'm fighting one other bug, but I think that'll be it.

I took interest in FreeBSD's fork of indent(1) because they've fixed more things than NetBSD people have in their fork, it seems. I'm also hoping it'll be easier to reinvent GNU indent's -tsn ("set tabsize to n spaces") option for FreeBSD indent than it would be for any other of the forks that aren't GNU. I envision that to be the first step to getting rid of some of the work-arounds pgindent does, mainly running entab and detab as pre- and post-processing steps.

If porting FreeBSD indent to PostgreSQL's sources turns out to be successful, there will be a choice between rebasing pg_bsd_indent on that and picking specific patches and applying it on PG's fork of indent(1).

[1] https://svnweb.freebsd.org/base/head/usr.bin/indent/lexi.c?r1=125619&r2=125623

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to