Re: Doing better at HINTing an appropriate column within errorMissingColumn()
От | Peter Geoghegan |
---|---|
Тема | Re: Doing better at HINTing an appropriate column within errorMissingColumn() |
Дата | |
Msg-id | CAM3SWZTgqcpVvT=mcgXcwofbSOXMTeJpAbjS0T0Bjb0K4ZQ8XQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Doing better at HINTing an appropriate column within errorMissingColumn() (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Doing better at HINTing an appropriate column within errorMissingColumn()
|
Список | pgsql-hackers |
On Wed, Nov 12, 2014 at 12:59 PM, Robert Haas <robertmhaas@gmail.com> wrote: > On that topic, I think there's unanimous consensus against the design > where equally-distant matches are treated differently based on whether > they are in the same RTE or different RTEs. I think you need to > change that if you want to get anywhere with this. On a related note, > the use of the additional parameter AttrNumber closest[2] to > searchRangeTableForCol() and of the additional parameters AttrNumber > *matchedatt and int *distance to scanRTEForColumn() is less than > self-documenting. I suggest creating a structure called something > like FuzzyAttrMatchState and passing a pointer to it down to both > functions. Attached patch incorporates this feedback. The only user-visible difference between this revision and the previous revision is that it's quite possible for two suggestion to originate from the same RTE (there is exactly one change in the regression test's expected output as compared to the last revision for this reason. The regression tests are otherwise unchanged). It's still not possible to see more than 2 suggestions under any circumstances, no matter where they might have originated from, which I think is appropriate -- we continue to not present any HINT in the event of 3 or more equidistant matches. I think that the restructuring required to pass around a state variable has resulted in somewhat clearer code. -- Peter Geoghegan
Вложения
В списке pgsql-hackers по дате отправления: