What would be really useful would be a command that would return the
actual SQL needed to create a function. At present the output from
\df+ needs to be pieced together to create a new CREATE OR REPLACE
string. A command that returnes that string for you would allow you to
copy and paste it in, do a minor edit and run the command very
quickly.

I've had to tweak functions quite a lot lately and having to construct
the command from the output from \df+ can be a bit of a pain.

In fact, it would be useful to have this for all entity types in the
system: tables, views and types etc. Perhaps a new symbol to follow
the \d command, such as * (just a random guess).

So:

\df* functionname

would output the CREATE OR REPLACE line for that funtion.

Thoughts?

On Thu, 4 Nov 2004 19:44:53 -0300, Alvaro Herrera
<[EMAIL PROTECTED]> wrote:
> On Thu, Nov 04, 2004 at 04:00:10PM -0600, Thomas F. O'Connell wrote:
> 
> Thomas,
> 
> > How do you get the results of \df+ into the buffer with \e? Just copy
> > and paste?
> 
> Right.  Single quotes tended to be an issue.  Not so with 8.0.  It's
> much better, of course, to have the original definition on a text file
> somewhere ...
> 
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> Este mail se entrega garantizadamente 100% libre de sarcasmo.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
> 


-- 

Russ

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to