aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-08-08 02:05:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-08-08 02:05:32 +0000
commit6c3561b9e4e1e1ef2654a4342eafd275cd8f238b (patch)
treeb1c8f7a090474c013655a6ff543e9a6a14c54404 /doc/src
parentff9d69d931367f7fdb5a6c22c1242c19201b7a5a (diff)
downloadpostgresql-6c3561b9e4e1e1ef2654a4342eafd275cd8f238b.tar.gz
postgresql-6c3561b9e4e1e1ef2654a4342eafd275cd8f238b.zip
Minor editorialization on example --- I think that the use of dollar
quoting in this case is just needless obscurantism.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_domain.sgml12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml
index 7cf6b4de385..2830d09cb5d 100644
--- a/doc/src/sgml/ref/create_domain.sgml
+++ b/doc/src/sgml/ref/create_domain.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.18 2004/08/08 01:49:30 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.19 2004/08/08 02:05:32 tgl Exp $
PostgreSQL documentation
-->
@@ -161,14 +161,14 @@ where <replaceable class="PARAMETER">constraint</replaceable> is:
<para>
This example creates the <type>us_postal_code</type> 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.
<programlisting>
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
);
</programlisting>
</para>