Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c3561b

Browse files
committed
Minor editorialization on example --- I think that the use of dollar
quoting in this case is just needless obscurantism.
1 parentff9d69d commit6c3561b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎doc/src/sgml/ref/create_domain.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.18 2004/08/0801:49:30 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.19 2004/08/0802:05:32 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -161,14 +161,14 @@ where <replaceable class="PARAMETER">constraint</replaceable> is:
161161

162162
<para>
163163
This example creates the <type>us_postal_code</type> data type and
164-
then uses the type in a table definition:
164+
then uses the type in a table definition. A regular expression test
165+
is used to verify that the value looks like a valid US postal code.
165166

166167
<programlisting>
167168
CREATE DOMAIN us_postal_code AS TEXT
168-
NOT NULL
169169
CHECK(
170-
VALUE ~$pc$^\d{5}$$pc$
171-
OR VALUE ~$pc$^\d{5}-\d{4}$$pc$
170+
VALUE ~'^\d{5}$'
171+
OR VALUE ~'^\d{5}-\d{4}$'
172172
);
173173

174174
CREATE TABLE us_snail_addy (
@@ -177,7 +177,7 @@ CREATE TABLE us_snail_addy (
177177
, street2 TEXT
178178
, street3 TEXT
179179
, city TEXT NOT NULL
180-
, postal us_postal_code
180+
, postal us_postal_code NOT NULL
181181
);
182182
</programlisting>
183183
</para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp