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
df533d29
Commit
df533d29
authored
Apr 27, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manual page update from Oliver Elphick
Oliver.Elphick@lfix.co.uk
parent
85519eea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
9 deletions
+42
-9
src/man/create_table.l
src/man/create_table.l
+42
-9
No files found.
src/man/create_table.l
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/26 04:09:4
3 momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_table.l,v 1.1
8 1998/04/27 03: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
specifies a list of
constraints or tests which new or updated entries
clause
s specify
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).
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