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
544992c3
Commit
544992c3
authored
27 years ago
by
Thomas G. Lockhart
Browse files
Options
Downloads
Patches
Plain Diff
Include information on new DEFAULT and CONSTRAINT clauses.
parent
09cfab3a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/man/alter_table.l
+9
-5
9 additions, 5 deletions
src/man/alter_table.l
src/man/create_table.l
+29
-10
29 additions, 10 deletions
src/man/create_table.l
with
38 additions
and
15 deletions
src/man/alter_table.l
+
9
−
5
View file @
544992c3
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/alter_table.l,v 1.
2
199
6/12/11 00:26:55 momjian
Exp $
.TH "ALTER TABLE" SQL
11/5/95 PostgreSQL
PostgreSQL
.\" $Header: /cvsroot/pgsql/src/man/Attic/alter_table.l,v 1.
3
199
7/09/26 15:21:26 thomas
Exp $
.TH "ALTER TABLE" SQL
09/25/97
PostgreSQL
.SH NAME
alter table \(em add attributes to a class
.SH SYNOPSIS
.nf
\fBalter table\fR classname [ * ]
\fBadd column\fR attname type
\fBadd\fR [ \fBcolumn\fR ] attname type
.fi
.nf
\fBalter table\fR classname [ * ]
\fBadd\fR \fB(\fR attname type \fB)\fR
.fi
.SH DESCRIPTION
...
...
@@ -18,7 +22,7 @@ causes a new attribute to be added to an existing class,
.IR classname .
The new attributes and their types are specified
in the same style and with the the same restrictions as in
.IR create table (l).
.IR
"
create table
"
(l).
.PP
In order to add an attribute to each class in an entire inheritance
hierarchy, use the
...
...
This diff is collapsed.
Click to expand it.
src/man/create_table.l
+
29
−
10
View file @
544992c3
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_table.l,v 1.
5
1997/0
8
/26 1
7:39:30 momjian
Exp $
.TH "CREATE TABLE" SQL
11/05/95 PostgreSQL
PostgreSQL
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_table.l,v 1.
6
1997/0
9
/26 1
5:21:27 thomas
Exp $
.TH "CREATE TABLE" SQL
09/25/97
PostgreSQL
.SH NAME
create table \(em create a new class
.SH SYNOPSIS
.nf
\fBcreate table \fR classname \fB(\fPattname-1 type-1 {\fB,\fP attname-i type-i}\fB)\fP
[\fBinherits\fR \fB(\fR classname-1 {\fB,\fR classname-i} \fB)\fR]
\fBcreate table\fR classname \fB(\fPattname type [\fBdefault\fP value] [\fB,\fP attname type \fBdefault\fP value]\fB)\fP
[\fBinherits\fR \fB(\fR classname [\fB,\fR classname] \fB)\fR]
[\fBconstraint\fR cname \fBcheck\fR \fB(\fR test \fB)\fR [\fB,\fR \fBcheck\fR test]
[\fBarchive\fR \fB=\fR archive_mode]
[\fBstore\fR \fB=\fR \*(lqsmgr_name\*(rq]
[\fBarch_store\fR \fB=\fR \*(lqsmgr_name\*(rq]
.fi
.SH DESCRIPTION
.BR "Create
t
able"
.BR "Create
T
able"
will enter a new class into the current data base. The class will be
\*(lqowned\*(rq by the user issuing the command. The name of the
class is
.IR classname
and the attributes are as specified in the list of
.IR attname s.
The
.IR i th
attribute is created with the type specified by
.IR type "-i."
Each attribute is created with the type specified by
.IR type "."
Each type may be a simple type, a complex type (set) or an array type.
Each attribute may have a default value, specified by the
.IR default
clause which is the keyword "default" followed by a constant or expression.
.PP
Each array attribute stores arrays that must have the same number of
dimensions but may have different sizes and array index bounds. An
...
...
@@ -36,6 +38,8 @@ pairs of square brackets:
.nf
att_name type[][]..[]
.fi
N.B. As of Postgres version 6.0, consistant array dimensions within an
attribute are not enforced. This will likely change in a future release.
.PP
The optional
.BR inherits
...
...
@@ -50,7 +54,7 @@ Each new class
.IR classname
is automatically created as a type. Therefore, one or more instances
from the class are automatically a type and can be used in
.IR alter table(l)
.IR
"
alter table
"
(l)
or other
.BR "create table"
statements. See
...
...
@@ -58,6 +62,13 @@ statements. See
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
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.
.PP
The optional
.BR store
and
.BR arch_store
...
...
@@ -119,6 +130,14 @@ create table permemp (plan char16) inherits (emp)
.fi
.nf
--
--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 <> '')
.fi
.nf
--
--Create class foo on magnetic disk and archive historical data
--
create table foo (bar int4) archive = heavy
...
...
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