Tom Lane wrote:
> "Robert Haas" <robertmhaas@gmail.com> writes:
>> Incidentally, I noticed while looking at this that "\h with" also
>> fails, even though WITH can now be the first word of a valid SQL
>> statement. I think we ought to patch psql to return the same help for
>> WITH as it does for SELECT.
>
> Hmm. Given the current infrastructure for \h, the only way to do that
> would be to make a separate ref page for WITH, which feels like the
> wrong thing.
There is a canonical solution for this with man pages, namely man page
links (those ".so" things in a man page that redirect to a different
one). In DocBook, you just list more than one refname in the refentry
to create this. I have committed a few bits of makefile to support
this. A bit more Perl hacking should also get psql up to speed. I
suggest we try if we like the results when WITH is linked to SELECT, and
then see about TABLE and whatever else.