Andrew Dunstan wrote:

Vinay Jain said:


Andrew Dunstan wrote:



If course it is not loaded each time. That would be insane. If not
preloaded it is loaded when first called in each process, and then
kept. It is never unloaded (except by the termination of the process
that loaded it).

It seems you have been laboring under a misapprehension.



If this is the case than I can make connection to data base in starting
of  indchar.so file and close connection at end of it and it should
work.... bingo!!
it would solve my problem




*sigh*


You are not getting it.

An immutable function MUST NOT DEPEND ON DATA IN THE DATABASE. Sorry to
shout but you really need to understand this.

Use static C data, not database tables. In addition to it being pure, it
will also be enormously faster than getting data from the database. Yes it
means that if you want to change the lookup data you need to recompile
your C function library, and to redo any indexes etc. that depend on the
function. That's just the way it is, I'm afraid.

cheers

andrew
Hi

ya you are right but i wanted to escape from compilation and stuff....

I will think on declaring function stable rather than immutable and test performance....
for the time being i will follow your advice...
thanks
regards
Vinay




---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend







---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to