/[pgestraier]/trunk/pgest.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/pgest.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 19 by dpavlin, Thu May 26 17:56:53 2005 UTC revision 20 by dpavlin, Thu May 26 19:42:36 2005 UTC
# Line 114  Datum pgest(PG_FUNCTION_ARGS) { Line 114  Datum pgest(PG_FUNCTION_ARGS) {
114                          SRF_RETURN_DONE(funcctx);                          SRF_RETURN_DONE(funcctx);
115                  }                  }
116                                    
117                  elog(INFO, "pgest: query[%s] attr[%s] limit %d offset %d", query, (PG_ARGISNULL(2) ? "NULL" : attr), limit, offset);                  elog(DEBUG1, "pgest: query[%s] attr[%s] limit %d offset %d", query, (PG_ARGISNULL(2) ? "NULL" : attr), limit, offset);
118                                    
119                  /* create a search condition object */                  /* create a search condition object */
120                  if (!(cond = est_cond_new())) {                  if (!(cond = est_cond_new())) {
# Line 128  Datum pgest(PG_FUNCTION_ARGS) { Line 128  Datum pgest(PG_FUNCTION_ARGS) {
128    
129                  /* minimum valid attribute length is 10: @a STREQ a */                  /* minimum valid attribute length is 10: @a STREQ a */
130                  if (! PG_ARGISNULL(2) && strlen(attr) >= 10) {                  if (! PG_ARGISNULL(2) && strlen(attr) >= 10) {
131                          elog(INFO,"est_cond_add_attr(%s)", attr);                          elog(DEBUG1,"est_cond_add_attr(%s)", attr);
132                          est_cond_add_attr(cond, attr);                          est_cond_add_attr(cond, attr);
133                  }                  }
134    
# Line 178  Datum pgest(PG_FUNCTION_ARGS) { Line 178  Datum pgest(PG_FUNCTION_ARGS) {
178          attinmeta = funcctx->attinmeta;          attinmeta = funcctx->attinmeta;
179    
180          if (limit && call_cntr > limit - 1) {          if (limit && call_cntr > limit - 1) {
181                  elog(INFO, "call_cntr: %d limit: %d", call_cntr, limit);                  elog(DEBUG1, "call_cntr: %d limit: %d", call_cntr, limit);
182                  SRF_RETURN_DONE(funcctx);                  SRF_RETURN_DONE(funcctx);
183          }          }
184    
# Line 390  Datum pgest_attr(PG_FUNCTION_ARGS) Line 390  Datum pgest_attr(PG_FUNCTION_ARGS)
390                          errdetail(est_err_msg(ecode))));                          errdetail(est_err_msg(ecode))));
391          }          }
392                                    
393          elog(INFO, "pgest_attr: query[%s] attr[%s] limit %d offset %d", query, (PG_ARGISNULL(2) ? "NULL" : attr), limit, offset);          elog(DEBUG1, "pgest_attr: query[%s] attr[%s] limit %d offset %d", query, (PG_ARGISNULL(2) ? "NULL" : attr), limit, offset);
394                    
395          /* create a search condition object */          /* create a search condition object */
396          if (!(cond = est_cond_new())) {          if (!(cond = est_cond_new())) {
# Line 404  Datum pgest_attr(PG_FUNCTION_ARGS) Line 404  Datum pgest_attr(PG_FUNCTION_ARGS)
404    
405          /* minimum valid attribute length is 10: @a STREQ a */          /* minimum valid attribute length is 10: @a STREQ a */
406          if (! PG_ARGISNULL(2) && strlen(attr) >= 10) {          if (! PG_ARGISNULL(2) && strlen(attr) >= 10) {
407                  elog(INFO,"est_cond_add_attr(%s)", attr);                  elog(DEBUG1,"est_cond_add_attr(%s)", attr);
408                  est_cond_add_attr(cond, attr);                  est_cond_add_attr(cond, attr);
409          }          }
410    
# Line 455  Datum pgest_attr(PG_FUNCTION_ARGS) Line 455  Datum pgest_attr(PG_FUNCTION_ARGS)
455                          if (!isnull && doc)                          if (!isnull && doc)
456                                  values[j] = DatumGetCString(                                  values[j] = DatumGetCString(
457                                          attr2text(doc,                                          attr2text(doc,
458                                                  DirectFunctionCall1(textout, dvalue)                                                  (char *)DirectFunctionCall1(textout, dvalue)
459                                          ));                                          ));
460                          else                          else
461                                  values[j] = NULL;                                  values[j] = NULL;

Legend:
Removed from v.19  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26