From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Making tab-complete.c easier to maintain |
Date: | 2015-09-04 13:40:43 |
Message-ID: | 17081.1441374043@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> See attached a proof-of-concept patch. It reduces the size of
> tab-complete.c by a bit over a thousand lines. I realise that changing so
> many lines just to refactor code may may be a difficult sell! But I think
> this would make it easier to improve the tab completion code in future, and
> although it's large it's a superficial and mechanical change.
I really dislike the magical "<" business. Maybe you could use NULL
instead of having to reserve a class of real strings as placeholders.
(That would require finding another way to denote the end of the list,
but a separate count argument seems like a possible answer.)
Or perhaps use empty strings as placeholders?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-09-04 13:42:20 | Re: Non-volatile variables used for spinlock manipulation |
Previous Message | Simon Riggs | 2015-09-04 13:30:14 | Re: Testing WAL replay by comparing before and after images again |