Re: how to edit a function from psql?

Поиск
Список
Период
Сортировка
От Russ Brown
Тема Re: how to edit a function from psql?
Дата
Msg-id 4b0dadc60411050222b73871d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to edit a function from psql?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
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
<alvherre@dcc.uchile.cl> 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 majordomo@postgresql.org
>


--

Russ

В списке pgsql-general по дате отправления:

Предыдущее
От: Joel
Дата:
Сообщение: Re: OS X Install
Следующее
От: "Gregory S. Williamson"
Дата:
Сообщение: Re: Conactenating text with null values