Re: psql with "Function Type" in \df

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql with "Function Type" in \df
Date: 2009-04-27 17:18:43
Message-ID: 20090427171843.GM1539@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
> > I have a handle on the problem, which is that the tab completion
> > code assumes, wrongly, that it only needs to deal with fixed
> > strings. It's actually been false for some time in the \div case,
> > for example. The S option has shattered the fixed-string
> > assumption.
>
> Check.
>
> > I'm proposing to refactor the backslash handling code so all of it
> > is in one spot with differences in the target list and WHERE
> > clauses depending on whether it's tab completion, S, +, what I'm
> > thinking of as second-level options--the [ivt]* in \d[ivt]* and
> > the [antw]* in \df[antw]*[S+]--and patterns.
>
> > Does this sound reasonable?
>
> It seems like rather a large change to be making in beta. Can you
> make a small patch that fixes the immediate problem, and leave the
> refactoring for 8.5?

The hack I've come up with short of the refactor is to duplicate a lot
of the backslash handling code from command.c and describe.c. It
doesn't strike me as being all that much less work than the refactor.

Is the hack worth doing?

What other ways to approach this have I missed?

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-04-27 17:31:11 Re: psql with "Function Type" in \df
Previous Message Tom Lane 2009-04-27 17:11:44 Re: psql with "Function Type" in \df