Re: Some questions on user defined types and functions.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Some questions on user defined types and functions.
Дата
Msg-id 12436.964648243@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Some questions on user defined types and functions.  (Jeffery Collins <collins@onyx-technologies.com>)
Ответы Re: Some questions on user defined types and functions.  ("Joel Burton" <jburton@scw.org>)
Re: Some questions on user defined types and functions.  (JanWieck@t-online.de (Jan Wieck))
Список pgsql-general
Jeffery Collins <collins@onyx-technologies.com> writes:
>>>> like the following syntax to work:
>>
>>>> CREATE FUNCTION myfunc(mytype) RETURNS text AS
>>>> '$HOME/lib/libmyso.so' LANGUAGE 'c':
>>
>>>> and have the environment variable $HOME "lazy" evaluated.  I
>>>> have looked at the fmgr code and this doesn't look too difficult to add
>>>> as long as I could get the $HOME past the parser.

> I have made the changes necessary to allow environment variables to be
> entered and expanded in file names.  Two files had to be changed
> backend/commands/define.c and backend/utils/fmgr/dfmgr.c.  Assuming you are
> interested in the change,

Well, that's a good question.  Does anyone else have an opinion on
whether this would be a good/bad/indifferent feature?  We've seen
problems in the past caused by depending on postmaster environment
variables (restart the postmaster with different environment than
usual, things mysteriously break).  So I'm inclined to feel that adding
more dependence on them isn't such a hot idea.  But I'm not going to
veto it if there's interest in the feature from other people.

> what is the proper way to build a patch file that
> contains the changes?  I have never done this before.

"diff -c" against current sources, done so that the correct file
pathnames are visible in the diff output; that is, cd to top level
of distribution tree and do something like
diff -c src/backend/utils/fmgr/dfmgr.c.orig src/backend/utils/fmgr/dfmgr.c
Don't forget to include diffs for documentation updates, as well.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: performance help
Следующее
От: "Joel Burton"
Дата:
Сообщение: Re: Some questions on user defined types and functions.