-
+
Data Types
(As the example shows, the sorting is first by length and then
alphabetically, but that detail is seldom important.) To represent
- lexemes containing whitespace, surround them with quotes:
+ lexemes containing whitespace or punctuation, surround them with quotes:
SELECT $$the lexeme ' ' contains spaces$$::tsvector;
(We use dollar-quoted string literals in this example and the next one,
to avoid confusing matters by having to double quote marks within the
- literals.) Embedded quotes can be handled by doubling them:
+ literals.) Embedded quotes and backslashes must be doubled:
SELECT $$the lexeme 'Joe''s' contains a quote$$::tsvector;