From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Making tab-complete.c easier to maintain
Date: Fri, 04 Sep 2015 09:40:43 -0400
Message-ID: <17081.1441374043@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=2wF0eTXfQUMzvJ71GC47ESQmWQ3Y_fz5CRBask1uA1DA@mail.gmail.com>
References: <CAEepm=2wF0eTXfQUMzvJ71GC47ESQmWQ3Y_fz5CRBask1uA1DA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com
Subject: Re: Making tab-complete.c easier to maintain
In-Reply-To: <17081.1441374043@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox