Re: how to edit a function from psql?

Поиск
Список
Период
Сортировка
От Thomas F.O'Connell
Тема Re: how to edit a function from psql?
Дата
Msg-id 5B5E0190-3137-11D9-B0FA-000D93AE0944@sitening.com
обсуждение исходный текст
Ответ на Re: how to edit a function from psql?  (Karim Nassar <Karim.Nassar@NAU.EDU>)
Ответы Re: how to edit a function from psql?  (Karim Nassar <Karim.Nassar@NAU.EDU>)
Список pgsql-general
What version of postgres are you using? In postgresql-7.4.6, I get an
empty query buffer when I try what you describe here.

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Nov 4, 2004, at 5:23 PM, Karim Nassar wrote:

> Here is what I get:
>
> orfs=# \df+ get_datasets
>
>                          List of functions
>  Result data type |    Schema    |     Name     |
> Argument
> data types               | Owner | Language
> |                              Source
> code
>      | Description
> ------------------+--------------+--------------
> +-------------------------------------------------+-------+----------
> +----------------------------------------------------------------------
> -----------------------------------------------------------------------
> -----------------------------------------------------------------------
> -----------------------------------------------------------------------
> ------------------------------------+-------------
>  refcursor        | weather_data | get_datasets | refcursor, character
> varying, character varying | kan4  | plpgsql  |
> DECLARE
>         _person_ ALIAS FOR $2;
>         _where_  ALIAS FOR $3;
>         selectstring text;
>
> BEGIN
>         selectstring := get_datasets_selstr(_person_, _where_);
>         -- RAISE NOTICE '%', selectstring;
>         OPEN $1 FOR EXECUTE selectstring;
>         RETURN $1;
> END;
>  |
> (1 row)
>
> orfs=# \e
> CREATE FUNCTION
>
> When I issue \e, the editor window pops up, apparently with the
> contents
> of the query buffer. When I exit the editor, the function definition is
> applied to create this function (the one in the buffer).
>
> orfs=# \?
> <snip>
> Query Buffer
>   \e [FILE]      edit the query buffer (or file) with external editor
>   \g [FILE]      send query buffer to server (and results to file or
> |pipe)
>   \p             show the contents of the query buffer
>   \r             reset (clear) the query buffer
>   \s [FILE]      display history or save it to file
>   \w [FILE]      write query buffer to file
> <snip>
>
> How did that function definition get in the query buffer? Seems that it
> sure would be nice to fill it \df+...
>
> \<.


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

Предыдущее
От: Karim Nassar
Дата:
Сообщение: Re: 24x7x365 high-volume ops ideas
Следующее
От: "madhu v t"
Дата:
Сообщение: technical help