From 6c3561b9e4e1e1ef2654a4342eafd275cd8f238b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 8 Aug 2004 02:05:32 +0000 Subject: [PATCH] Minor editorialization on example --- I think that the use of dollar quoting in this case is just needless obscurantism. --- doc/src/sgml/ref/create_domain.sgml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml index 7cf6b4de38..2830d09cb5 100644 --- a/doc/src/sgml/ref/create_domain.sgml +++ b/doc/src/sgml/ref/create_domain.sgml @@ -1,5 +1,5 @@ @@ -161,14 +161,14 @@ where constraint is: This example creates the us_postal_code data type and - then uses the type in a table definition: + then uses the type in a table definition. A regular expression test + is used to verify that the value looks like a valid US postal code. CREATE DOMAIN us_postal_code AS TEXT -NOT NULL CHECK( - VALUE ~ $pc$^\d{5}$$pc$ -OR VALUE ~ $pc$^\d{5}-\d{4}$$pc$ + VALUE ~ '^\d{5}$' +OR VALUE ~ '^\d{5}-\d{4}$' ); CREATE TABLE us_snail_addy ( @@ -177,7 +177,7 @@ CREATE TABLE us_snail_addy ( , street2 TEXT , street3 TEXT , city TEXT NOT NULL -, postal us_postal_code +, postal us_postal_code NOT NULL );