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())) { |
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 |
|
|
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 |
|
|
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())) { |
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 |
|
|
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; |