Commit fec1d72d authored by Tom Lane's avatar Tom Lane

Clarify the syntax rules for raw tsvector input.

parent d23ba77a
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.216 2007/11/08 13:13:51 petere Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.217 2007/11/21 04:01:37 tgl Exp $ -->
<chapter id="datatype"> <chapter id="datatype">
<title id="datatype-title">Data Types</title> <title id="datatype-title">Data Types</title>
...@@ -3282,7 +3282,7 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector; ...@@ -3282,7 +3282,7 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector;
(As the example shows, the sorting is first by length and then (As the example shows, the sorting is first by length and then
alphabetically, but that detail is seldom important.) To represent 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:
<programlisting> <programlisting>
SELECT $$the lexeme ' ' contains spaces$$::tsvector; SELECT $$the lexeme ' ' contains spaces$$::tsvector;
...@@ -3293,7 +3293,7 @@ SELECT $$the lexeme ' ' contains spaces$$::tsvector; ...@@ -3293,7 +3293,7 @@ SELECT $$the lexeme ' ' contains spaces$$::tsvector;
(We use dollar-quoted string literals in this example and the next one, (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 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:
<programlisting> <programlisting>
SELECT $$the lexeme 'Joe''s' contains a quote$$::tsvector; SELECT $$the lexeme 'Joe''s' contains a quote$$::tsvector;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment