Re: Duplicate code in psql's \ commands - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Duplicate code in psql's \ commands
Date
Msg-id 20532.1240164588@sss.pgh.pa.us
Whole thread Raw
In response to Duplicate code in psql's \ commands  (David Fetter <david@fetter.org>)
Responses Re: Duplicate code in psql's \ commands
List pgsql-hackers
David Fetter <david@fetter.org> writes:
> While working on the new improved \df, I noticed a pretty major
> infelicity, namely that \ commands get validated by two completely
> independent code paths, namely tab-complete.c and
> command.c/describe.c.

Why is tab-complete doing anything that could be described as validation?

> I'm thinking it would be a good idea to factor the validating out as
> far as possible.  This would also make it easier to make sure that tab
> completion and \'s output match to the maximal reasonable extent.

I rather doubt that this will really be much of a win, but if you want
to try it as a separate patch, go ahead.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Patch for 8.5, transformationHook
Next
From: David Fetter
Date:
Subject: Re: Duplicate code in psql's \ commands