Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0236b5e0
Commit
0236b5e0
authored
Aug 08, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This patch adds an example to the CREATE DOMAIN docs.
David Fetter
parent
ff8d68df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
doc/src/sgml/ref/create_domain.sgml
doc/src/sgml/ref/create_domain.sgml
+19
-5
No files found.
doc/src/sgml/ref/create_domain.sgml
View file @
0236b5e0
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.1
7 2003/11/29 19:51:38 pgsql
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.1
8 2004/08/08 01:49:30 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -160,11 +160,25 @@ where <replaceable class="PARAMETER">constraint</replaceable> is:
<title>Examples</title>
<para>
This example creates the <type>country_code</type> data type and then uses the
type in a table definition:
This example creates the <type>us_postal_code</type> data type and
then uses the type in a table definition:
<programlisting>
CREATE DOMAIN country_code char(2) NOT NULL;
CREATE TABLE countrylist (id integer, country country_code);
CREATE DOMAIN us_postal_code AS TEXT
NOT NULL
CHECK(
VALUE ~ $pc$^\d{5}$$pc$
OR VALUE ~ $pc$^\d{5}-\d{4}$$pc$
);
CREATE TABLE us_snail_addy (
address_id SERIAL NOT NULL PRIMARY KEY
, street1 TEXT NOT NULL
, street2 TEXT
, street3 TEXT
, city TEXT NOT NULL
, postal us_postal_code
);
</programlisting>
</para>
</refsect1>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment