Re: PG function call

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: PG function call
Дата
Msg-id 20051006155757.GD10127@svana.org
обсуждение исходный текст
Ответ на Re: PG function call  ("smile khmer" <khmersmile@email.com>)
Список pgsql-hackers
On Thu, Oct 06, 2005 at 10:01:55AM -0500, smile khmer wrote:
> but when I write the output to file (not standard out put), it won't finish, so I interupted and
> there're more than 50.000 lines,...

What did you expect? PostgreSQL uses indexes for everything from
looking up functions to finding tables, types, operators, etc. The
compare function will be called for eachtime it wants to do a
comparison in the index, which could be many, many times. I had a trace
that called btcompare 79 million times in a single query.

If you want to know how it got there, I suggest you attach a debugger
to the backend, put a breakpoint there and use "bt" to get a backtrace
to see where it came from.

> and during the compiling process, there's alot of messages like these :
> .............................
> tsort: -: input contains a loop:

Ignore that, not relevent.

> then, if I want to change somepart of the code or write one function
> which will tell postgresql to call this function whenever It compares
> the string or character data type. I've found "citext" project but I
> still don't understand where exactly to modified code.

Once you have created the functions and compiled them, you use CREATE
FUNCTION so the backend knows about them...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: execution of nested loop joins
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PERFORM] A Better External Sort?