Hi!
I have interesting in 2 problems:
1. I have xxx.so written in C for postgres countaining function yyy(). May
yyy() refers to postgres with other requests?
yyy() {
...
PQexec("... any request ...");
...
}
application:
select * from aaa where yyy()='bbb';
2. I make module xxx.so contaning function yyy(). May I (how?) open resource
(file,hash,etc) once per sql request? What I mean:
yyy(text zz) {
...
fp=fopen("aaa","r");
...
reading from file
...
fclose(fp);
...
}
select * from aaa where yyy(name)='bbb';
This request will run yyy(db_field) as many times as how many records in
the table found. Each call yyy() will open/close files. Its not good. OK,
file opens very fast in unix but hash opens not so fast! I need to make hash
lookups :-( How to reduce opening/closing files/hashes etc?
SKiller
--------------------------
Sergei Keler
WebMaster of "ComSet"
E-Mail: [EMAIL PROTECTED]
http://www.comset.net
--------------------------