Re: Making tab-complete.c easier to maintain - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Making tab-complete.c easier to maintain
Date
Msg-id 17081.1441374043@sss.pgh.pa.us
Whole thread Raw
In response to Making tab-complete.c easier to maintain  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: Making tab-complete.c easier to maintain  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Testing WAL replay by comparing before and after images again
Next
From: Tom Lane
Date:
Subject: Re: Non-volatile variables used for spinlock manipulation