Re: psql: Make tab completion work for ANALYZE VERBOSE ... - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: psql: Make tab completion work for ANALYZE VERBOSE ...
Date
Msg-id 49CCD67C.2000301@endpoint.com
Whole thread Raw
In response to Re: psql: Make tab completion work for ANALYZE VERBOSE ...  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: psql: Make tab completion work for ANALYZE VERBOSE ...  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
> I find that that particular rule is formatted differently than the
> others. It took me a while to figure out how it works.

Yeah, me too, but I was trying to keep my change inline with the local logic, so
to speak. +1 to making it more consistent.

> While we're at it, any idea what the logic behind this rule is:
>
>>     else if ((pg_strcasecmp(prev_wd, "ANALYZE") == 0 &&
>>               pg_strcasecmp(prev2_wd, "VERBOSE") == 0) ||
>>              (pg_strcasecmp(prev_wd, "VERBOSE") == 0 &&
>>               pg_strcasecmp(prev2_wd, "ANALYZE") == 0))
>>         COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
>
> ? The first part of that I understand, "ANALYZE VERBOSE", but "VERBOSE
> ANALYZE" isn't valid SQL.

I suspect this is to catch "VACUUM VERBOSE ANALYZE" (where VACUUM would be the
implicit prev3_wd)

--
Greg Sabino Mullane greg@endpoint.com
End Point Corporation
PGP Key: 0x14964AC8


pgsql-hackers by date:

Previous
From: Guillaume Smet
Date:
Subject: Re: 8.4 open items list
Next
From: Peter Eisentraut
Date:
Subject: Re: SSL over Unix-domain sockets