Bird
0
0

Why does this command fail?

medium📝 Debug Q7 of 15
PostgreSQL - Full-Text Search
Why does this command fail?
ALTER TEXT SEARCH CONFIGURATION english ADD MAPPING asciiword WITH simple;
ACannot alter built-in configurations directly
BMapping syntax is incorrect
CMissing semicolon at the end
DDictionary 'simple' does not exist
Step-by-Step Solution
Solution:
  1. Step 1: Examine the ALTER syntax

    The ADD MAPPING clause requires the FOR keyword: ADD MAPPING FOR token WITH dictionary.
  2. Step 2: Rule out other issues

    Built-in configurations can be altered (though not recommended), semicolon is present, and 'simple' dictionary exists.
  3. Final Answer:

    Mapping syntax is incorrect -> Option B
  4. Quick Check:

    ADD MAPPING requires FOR keyword [OK]
Quick Trick: ADD MAPPING syntax: FOR token WITH dict [OK]
Common Mistakes:
  • Missing FOR keyword in ADD MAPPING
  • Assuming built-in configurations cannot be altered
  • Thinking dictionary 'simple' is missing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes