Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
df533d29
Commit
df533d29
authored
26 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
manual page update from Oliver Elphick
Oliver.Elphick@lfix.co.uk
parent
85519eea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/man/create_table.l
+42
-9
42 additions, 9 deletions
src/man/create_table.l
with
42 additions
and
9 deletions
src/man/create_table.l
+
42
−
9
View file @
df533d29
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_table.l,v 1.1
7
1998/04/2
6
0
4:09:4
3 momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_table.l,v 1.1
8
1998/04/2
7
0
3:41:3
3 momjian Exp $
.TH "CREATE TABLE" SQL 09/25/97 PostgreSQL
.SH NAME
create table - create a new class
.SH SYNOPSIS
.nf
\fBcreate table\fR classname \fB(\fPattname type [\fBdefault\fP value] [\fBnot null\fP]
[\fB,\fP attname type [\fBdefault\fP value] [\fBnot null\fP] [, ...] ]\fB )\fP
[\fBinherits\fR \fB(\fR classname [\fB,\fR classname] \fB)\fR]
[\fBconstraint\fR cname \fBcheck\fR \fB(\fR test \fB)\fR [, \fBcheck\fR \fB(\fR test \fB)\fR ] ]
\fBcreate table\fR classname
\fB(\fP
attname type
[\fBdefault\fP value]
[[\fBnot null\fP] [\fBunique\fP] | [\fBprimary key\fP]]
[\fBreferences\fP classname \fB(\fP attname \fB)\fP]
[\fBcheck (\fP condition\fB )\fP]
[\fB,\fP attname type [constraint] [\fB,\fP ...] ]
[\fB, primary key ( \fPattname, attname[,...] \fB)\fP]
[\fB, unique ( \fPattname, attname[,...] \fB)\fP]
[\fB, foreign key ( \fPattname, attname[,...] \fB) references\fP classname]
[\fB,\fP [\fBconstraint\fR cname] \fBcheck\fR \fB(\fR test \fB)\fR [, \fBcheck\fR \fB(\fR test \fB)\fR ] ]
\fB)\fP
[\fBinherits\fR \fB(\fR classname [\fB,\fR classname] \fB)\fR]
.fi
.SH DESCRIPTION
.BR "Create Table"
...
...
@@ -62,10 +72,12 @@ for a further discussion of this point.
.PP
The optional
.BR constraint
clause specif
ies a list of
constraints or tests which new or updated entries
clause
s
specif
y
constraints or tests which new or updated entries
must satisfy for an insert or update operation to succeed. Each constraint
must evaluate to a boolean expression. Multiple attributes may be referenced within
a single constraint.
a single constraint. The use of \fBprimary key (\fPattname[\fB,\fP...]\fB)\fP
as a table constraint
is mutually incompatible with \fBprimary key\fP used as a column constraint.
.PP
The new class is created as a heap with no initial data. A class can
have no more than 1600 attributes (realistically, this is limited by the
...
...
@@ -92,8 +104,8 @@ create table permemp (plan name) inherits (emp)
--Create class emppay with attributes name and wage with
--a default salary and constraints on wage range
--
create table emppay (name text not null, wage float4 default 10.00
)
constraint empcon check (wage > 5.30 and wage <= 30.00), check (name <> '')
create table emppay (name text not null, wage float4 default 10.00
constraint empcon check (wage > 5.30 and wage <= 30.00), check (name <> '')
)
.fi
.nf
--
...
...
@@ -112,5 +124,26 @@ create table tictactoe (game int4, board char[][])
--
create table newemp (name text, manager newemp)
.fi
.nf
--
--Create a table using SQL92 syntax
create table component
(
assembly char(8) not null
references job (id),
product char(8) not null
references product (id),
sorting int,
qty int check (qty >= 0),
primary key (assembly, product),
unique (assembly, product, sorting),
constraint not_same check (assembly != product)
)
.fi
.PP
.SH BUGS
The \fBforeign key\fP and \fBreferences\fP keywords are parsed but not yet
implemented in PostgreSQL 6.3.1.
.SH "SEE ALSO"
drop table(l).
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment