Re: [PATCH] "\ef " in psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] "\ef " in psql
Date
Msg-id 11443.1220678918@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] "\ef " in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] "\ef " in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> * the psql command seemed to have some ideas about supplying a blank
> CREATE OR REPLACE FUNCTION command for a nonexistent function, but this
> didn't actually work.  In any case it seemed poorly thought out, because
> you'd really need to pay some attention to *why* the regproc/regprocedure
> lookup failed.  I just ripped it out for the moment.  I'm not averse to
> the concept, if you can get it implemented properly.

While I was out at dinner, the obvious solution presented itself: define
\ef with no argument as being the command that presents an empty CREATE
FUNCTION command template to fill in.  This isn't any more or less
typing than where I think you were going, and it eliminates all the
ambiguity about whether you meant to type a nonexistent function name
or just mistyped.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] "\ef " in psql
Next
From: "Asko Oja"
Date:
Subject: Re: reducing statistics write overhead