Re: [HACKERS] SOS, help me please, one problem towards the postgresql developement on windows

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [HACKERS] SOS, help me please, one problem towards the postgresql developement on windows
Дата
Msg-id 20070501093610.GA27233@svana.org
обсуждение исходный текст
Ответы Re: [HACKERS] SOS, help me please, one problem towards the postgresql developement on windows  (shieldy <shieldly@gmail.com>)
Список pgsql-general
On Mon, Apr 30, 2007 at 11:05:35AM +0800, shieldy wrote:
> thankyou for your reply.
> I added it to the backend, because the internal ones such as box_intersect()
> function is keeped at there. so in my opinion, I just need to add a function
> to the files, and then compile it. then we can use it as the internal ones.
> bytheway, what's the backend file used for? I just didnot quite understand
> the postgresql.  and your meaning " place it in a module" , how should i
> do??

First, please reply to the list, not to me directly.

Secondly, just because you add it to the backend doesn't mean you can
use it straight away. There are thousands of functions in postgresql you
can't access from SQL, you have to declare them. See here:

http://www.postgresql.org/docs/8.2/interactive/xfunc-internal.html

Finally, by putting it in the backend you have to rebuild postgres
every time you want to change a function. Complete waste of time as
postgres can load external modules. See here:

http://www.postgresql.org/docs/8.2/interactive/xfunc-c.html

Or better, just read the whole "Extending SQL" section.

http://www.postgresql.org/docs/8.2/interactive/extend.html

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Selecting from a function(x,y) returning a row-type(sum, prod)
Следующее
От: Listmail
Дата:
Сообщение: Re: PG Books