Bird
0
0

You run the following command:

medium📝 Debug Q14 of 15
PostgreSQL - Full-Text Search
You run the following command:
ALTER TEXT SEARCH CONFIGURATION my_config
  ALTER MAPPING FOR word WITH english_stem;

But you get an error: ERROR: dictionary "english_stem" does not exist
What is the most likely cause?
AThe configuration name is reserved and cannot be changed
BALTER MAPPING cannot be used on existing configurations
CYou must drop the configuration before altering it
DThe dictionary name is misspelled or not created
Step-by-Step Solution
Solution:
  1. Step 1: Analyze error message

    The error says the dictionary "english_stem" does not exist, indicating PostgreSQL cannot find that dictionary.
  2. Step 2: Identify cause

    Most likely, the dictionary name is misspelled or the dictionary was never created in the database.
  3. Final Answer:

    The dictionary name is misspelled or not created -> Option D
  4. Quick Check:

    Dictionary must exist before use [OK]
Quick Trick: Check dictionary exists before ALTER MAPPING [OK]
Common Mistakes:
  • Assuming ALTER MAPPING is disallowed on configs
  • Trying to drop config unnecessarily
  • Ignoring dictionary creation step

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes