Teodor Sigaev <[EMAIL PROTECTED]> writes: > amcanmulticol doesn't resolve issue, because restriction clause might > present, > but it might have not any actual values ( void tsquery, void array ) and > semantic meaning of void query might be a 'any tuple matches'. Suggested > gincostestimation's patch allows to prevent from index in some situations, I > imagine, that isn't a good solution for two reason: > - high cost doesn't guarantee an indexscan will be choosen > - Doesn't work with anything except Const query > But I didn't find a better place to insert it to resolve first point.
If you're going to support operators that could allow every tuple to match, then I think you had better find a way to allow a full index scan within GIN. Because the above does not fix the problem, it's only a very crude band-aid; you *cannot* assume that you'll always have Consts to look at. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match