Change error to warning and increase thresholds of tsearch

Started by Ankit Kumar Pandeyabout 4 years ago1 messageshackers
Jump to latest
#1Ankit Kumar Pandey
itsankitkp@gmail.com

Hi,

I was looking at Todo item:/Consider changing error to warning for strings larger than one megabyte/
and after going through existing mails and suggestions. I would like to propose a patch for tsearch to change error into warning for string larger than one mb and also increase word and position limits.

I've checked operations select/insertion/index, which worked fine without any error (except for the warning as intended).

Thoughts: I am not really sure why was it proposed in the mail to decrease len/MAXSTRLEN.

You could decrease len in WordEntry to 9 (512 characters) and increase
pos to 22 (4 Mb). Don't forget to update MAXSTRLEN and MAXSTRPOS
accordingly.

I'm attaching a patch herewith. I will be glad to get some feedback on this.

Thanks,
Ankit

Attachments:

t46924_1
v1-0001-change-error-to-warn-for-tsearch-and-increase-limits.patchtext/x-patch; charset=UTF-8; name=v1-0001-change-error-to-warn-for-tsearch-and-increase-limits.patchDownload+10-7