Auto-complete offers to complete keywords which are already complete...
Example:
In my amavisd database I have a quarantine table. If I type this query
CODE
select mail_id from quarantine;
and then move the cursor onto the word "quarantine", I'm offered the option to tab-complete the word. If you do so, it appends the portion of data that occurs after the caret.
For instance, if the caret is located at the second a in quarantine when tab is pressed, you end up with "quarantinentine"
Edit: Just tested this in B6. I see the same behavior, as well as something else, directly related.
The table mentioned above has a "quar_loc". If you place the caret on the r in quarantine, you end up with "quar_locantine". Note that the "quar_loc" option is not displayed to the user - it just happens if you press tab.
Ideally, (IMO) auto-complete should only be offered at the end of a word, or after a .