June 2024
Intermediate to advanced
456 pages
11h 34m
English
In this section, you’ll tackle the challenge introduced in the last section. You’ll accept and store formatted strings with “significant” casing, exactly as the user has supplied the text. At the same time, when comparing values, you’ll compare them without their original casing.
While there are multiple ways to accomplish this in PostgreSQL, we’ll start by looking at a tactic that requires an extension.
Enable the citext[96] module (extension) for the Rideshare database. To do that, run the following statement from psql:
| | CREATE EXTENSION IF NOT EXISTS citext; |
Running \dx from psql should show the extension.
citext provides a case-insensitive character type you’ll use as a column type.
To test ...
Read now
Unlock full access