Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7372b8c

Browse files
committed
Remove stuff that is now in psql \d.
1 parent c5d7a27 commit 7372b8c

File tree

1 file changed

+41
-195
lines changed

1 file changed

+41
-195
lines changed

src/man/pgbuiltin.3

Lines changed: 41 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,20 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/pgbuiltin.3,v 1.9 1997/11/17 22:15:03 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/pgbuiltin.3,v 1.10 1997/11/18 23:04:27 momjian Exp $
44
.TH PGBUILTIN INTRO 04/01/97 PostgreSQL PostgreSQL
5+
.PP
56
.SH "DESCRIPTION"
67
This section describes the data types, functions and operators
78
available to users in Postgres as it is distributed.
9+
.PP
810
.SH "PGBUILTIN TYPES"
9-
This section describes
10-
.BR pgbuiltin
11-
data types.
12-
These Built-in types are installed in every database.
11+
Built-in types are installed in every database.
12+
.IR "psql"
13+
has a \ed command to show these types.
1314
.PP
1415
Users may add new types to Postgres using the
1516
.IR "define type"
16-
command described in this manual. User-defined types are not
17-
described in this section.
18-
.SH "List of built-in types"
19-
.PP
20-
.if n .ta 5 +15 +40
21-
.if t .ta 0.5i +1.5i +3.0i
22-
.in 0
23-
.nf
24-
\fBPOSTGRES Type\fP \fBMeaning\fP
25-
abstime (absolute) limited-range date and time
26-
aclitem access control list item
27-
bool boolean
28-
box 2-dimensional rectangle
29-
bpchar blank-padded characters
30-
bytea variable length array of bytes
31-
char character
32-
char2 array of 2 characters
33-
char4 array of 4 characters
34-
char8 array of 8 characters
35-
char16 array of 16 characters
36-
cid command identifier type
37-
date ANSI SQL date type
38-
datetime general-use date and time
39-
filename large object filename
40-
int2 two-byte signed integer
41-
int28 array of 8 int2
42-
int4 four-byte signed integer
43-
float4 single-precision floating-point number
44-
float8 double-precision floating-point number
45-
lseg 2-dimensional line segment
46-
money decimal type with fixed precision
47-
name a multi-character type for storing system identifiers
48-
oid object identifier type
49-
oid8 array of 8 oid
50-
oidchar16 oid and char16 composed
51-
oidint2 oid and int2 composed
52-
oidint4 oid and int4 composed
53-
path open or closed line segments
54-
point 2-dimensional geometric point
55-
polygon 2-dimensional polygon (same as a closed path)
56-
circle 2-dimensional circle (center and radius)
57-
regproc registered procedure
58-
reltime (relative) date and time span (duration)
59-
smgr storage manager
60-
text variable length array of characters
61-
tid tuple identifier type
62-
time ANSI SQL time type
63-
timespan general-use time span (duration)
64-
timestamp limited-range ISO-format date and time
65-
tinterval time interval (start and stop abstime)
66-
varchar variable-length characters
67-
xid transaction identifier type
68-
69-
.fi
70-
.in
17+
command described in this manual.
7118
.PP
7219
There are some data types defined by SQL/92 syntax which are mapped directly
7320
into native Postgres types. Note that the "exact numerics"
@@ -76,10 +23,10 @@ and
7623
.IR numeric
7724
have fully implemented syntax but currently (postgres v6.2) support only a limited
7825
range of the values allowed by SQL/92.
79-
26+
.PP
8027
.SH "List of SQL/92 types"
8128
.PP
82-
.if n .ta 5 +15 +25 +40
29+
.if n .ta 2 +15 +25 +40
8330
.if t .ta 0.5i +1.5i +3.0i
8431
.in 0
8532
.nf
@@ -101,9 +48,10 @@ range of the values allowed by SQL/92.
10148
.in
10249
.PP
10350
There are some constants and functions defined in SQL/92.
51+
.PP
10452
.SH "List of SQL/92 constants"
10553
.PP
106-
.if n .ta 5 +20 +40
54+
.if n .ta 2 +20 +40
10755
.if t .ta 0.5i +1.5i +3.0i +4.0i
10856
.in 0
10957
.nf
@@ -118,7 +66,7 @@ There are some constants and functions defined in SQL/92.
11866
Many of the built-in types have obvious external formats. However, several
11967
types are either unique to Postgres, such as open and closed paths, or have
12068
several possibilities for formats, such as date and time types.
121-
69+
.PP
12270
.SH "Syntax of date and time types"
12371
Most date and time types share code for data input. For those types (
12472
.IR datetime ,
@@ -145,7 +93,7 @@ In future releases, the number of date/time types will decrease, with the curren
14593
implementation of datetime becoming timestamp, timespan becoming interval,
14694
and (possibly) abstime
14795
and reltime being deprecated in favor of timestamp and interval.
148-
96+
.PP
14997
.SH "DATETIME"
15098
General-use date and time is input using a wide range of
15199
styles, including ISO-compatible, SQL-compatible, traditional
@@ -196,7 +144,7 @@ and `epoch' can be used to specify
196144
time values. `now' means the current time, and differs from
197145
`current' in that the current time is immediately substituted
198146
for it. `epoch' means Jan 1 00:00:00 1970 GMT.
199-
147+
.PP
200148
.SH "TIMESPAN"
201149
General-use time span is input using a wide range of
202150
syntaxes, including ISO-compatible, SQL-compatible, traditional
@@ -221,6 +169,7 @@ where
221169
or abbreviations or plurals of these units.
222170
Direction is `ago'.
223171
.fi
172+
.PP
224173
.SH "ABSOLUTE TIME"
225174
Absolute time (abstime) is a limited-range (+/- 68 years) and limited-precision (1 sec)
226175
date data type.
@@ -251,7 +200,7 @@ All special values allowed for
251200
.IR "datetime"
252201
are also allowed for
253202
.IR "absolute time".
254-
203+
.PP
255204
.SH "RELATIVE TIME"
256205
Relative time (reltime) is a limited-range (+/- 68 years) and limited-precision (1 sec)
257206
time span data type.
@@ -279,7 +228,7 @@ where
279228
Valid relative times are less than or equal to 68 years.)
280229
In addition, the special relative time \*(lqUndefined RelTime\*(rq is
281230
provided.
282-
231+
.PP
283232
.SH "TIMESTAMP"
284233
This is currently a limited-range absolute time which closely resembles the
285234
.IR abstime
@@ -289,7 +238,7 @@ and will move toward SQL92 compliance.
289238

290239
.PP
291240
timestamp is specified using the same syntax as for datetime.
292-
241+
.PP
293242
.SH "TIME RANGES"
294243
Time ranges are specified as:
295244
.PP
@@ -300,7 +249,7 @@ where
300249
.IR abstime
301250
is a time in the absolute time format. Special abstime values such as
302251
\*(lqcurrent\*(rq, \*(lqinfinity\*(rq and \*(lq-infinity\*(rq can be used.
303-
252+
.PP
304253
.SH "Syntax of geometric types"
305254
.SH "POINT"
306255
Points are specified using the following syntax:
@@ -353,6 +302,7 @@ The corners are reordered on input to store
353302
the lower left corner first and the upper right corner last.
354303
Other corners of the box can be entered, but the lower
355304
left and upper right corners are determined from the input and stored.
305+
.PP
356306
.SH "PATH"
357307
Paths are represented by sets of points. Paths can be "open", where
358308
the first and last points in the set are not connected, and "closed",
@@ -391,7 +341,7 @@ v6.1 used a format for paths which had a single leading parenthesis, a "closed"
391341
an integer count of the number of points, then the list of points followed by a
392342
closing parenthesis. The built-in function upgradepath() is supplied to convert
393343
paths dumped and reloaded from pre-v6.1 databases.
394-
344+
.PP
395345
.SH "POLYGON"
396346
Polygons are represented by sets of points. Polygons should probably be
397347
considered
@@ -423,7 +373,7 @@ v6.1 used a format for polygons which had a single leading parenthesis, the list
423373
of x-axis coordinates, the list of y-axis coordinates, followed by a closing parenthesis.
424374
The built-in function upgradepoly() is supplied to convert
425375
polygons dumped and reloaded from pre-v6.1 databases.
426-
376+
.PP
427377
.SH "CIRCLE"
428378
Circles are represented by a center point and a radius.
429379
.PP
@@ -444,138 +394,35 @@ where
444394
.fi
445395
.PP
446396
Circles are output using the first syntax.
447-
397+
.PP
448398
.SH "Built-in operators and functions"
449399
.SH OPERATORS
450400
Postgres provides a large number of built-in operators on system types.
451401
These operators are declared in the system catalog
452402
\*(lqpg_operator\*(rq. Every entry in \*(lqpg_operator\*(rq includes
453403
the object ID of the procedure that implements the operator.
454404
.PP
455-
Users may invoke operators using the operator name, as in
405+
Users may invoke operators using the operator name, as in:
406+
.PP
407+
.in 1i
456408
.nf
457409
select * from emp where salary < 40000;
458410
.fi
411+
.in
412+
.PP
459413
Alternatively, users may call the functions that implement the
460414
operators directly. In this case, the query above would be expressed
461-
as
415+
as:
416+
.PP
417+
.in 1i
462418
.nf
463419
select * from emp where int4lt(salary, 40000);
464420
.fi
465-
The rest of this section provides a list of the built-in operators and
466-
the functions that implement them. Binary operators are listed first,
467-
followed by unary operators.
468-
469-
.nf
470-
Operators:
471-
472-
general
473-
<\(eq less or equal
474-
<> inequality
475-
< less than
476-
<\(eq greater or equal
477-
>\(eq greater or equal
478-
> greater than
479-
\(eq equality
480-
~ A matches regular expression B, case-sensitive
481-
!~ A does not match regular expression B, case-sensitive
482-
~* A matches regular expression B, case-insensitive.
483-
!~* A does not match regular expression B, case-insensitive
484-
~~ A matches LIKE expression B, case-sensitive
485-
!~~ A does not match LIKE expression B, case-sensitive
486-
487-
+ addition
488-
\(mi subtraction
489-
* multiplication
490-
/ division
491-
% modulus
492-
@ absolute value
493-
494-
geometric
495-
@ A contained by (inside or on) B
496-
~ A contains (around or on) B
497-
@@ center of object
498-
<-> distance between A and B
499-
&& objects overlap
500-
&< A overlaps B, but does not extend to right of B
501-
&> A overlaps B, but does not extend to left of B
502-
<< A is left of B
503-
>> A is right of B
504-
>^ A is above B
505-
<^ A is below B
506-
507-
float8
508-
^ exponentiation
509-
% truncate to integer
510-
|/ square root
511-
||/ cube root
512-
: exponential function
513-
; natural logarithm (in psql, protect with parentheses)
514-
515-
point
516-
<< A is left of B
517-
>> A is right of B
518-
>^ A is above B
519-
<^ A is below B
520-
~\(eq A same as B (equality)
521-
@ point inside (or on) path, box, circle, polygon
522-
523-
box
524-
&& boxes overlap
525-
&< box A overlaps box B, but does not extend to right of box B
526-
&> box A overlaps box B, but does not extend to left of box B
527-
<< A is left of B
528-
>> A is right of B
529-
>^ A is above B
530-
<^ A is below B
531-
\(eq area equal
532-
< area less than
533-
<\(eq area less or equal
534-
>\(eq area greater or equal
535-
> area greater than
536-
~\(eq A same as B (equality)
537-
@ A is contained in B
538-
~ A contains B
539-
@@ center of box
540-
541-
polygon
542-
&& polygons overlap
543-
&< A overlaps B but does not extend to right of B
544-
&> A overlaps B but does not extend to left of B
545-
<< A is left of B
546-
>> A is right of B
547-
~\(eq A same as B (equality)
548-
@ A is contained by B
549-
~ A contains B
550-
551-
circle
552-
&& circles overlap
553-
&< A overlaps B but does not extend to right of B
554-
&> A overlaps B but does not extend to left of B
555-
<< A is left of B
556-
>> A is right of B
557-
>^ A is above B
558-
<^ A is below B
559-
~\(eq A same as B (equality)
560-
@ A is contained by B
561-
~ A contains B
562-
563-
tinterval
564-
#<\(eq interval length less or equal reltime
565-
#<> interval length not equal to reltime.
566-
#< interval length less than reltime
567-
#\(eq interval length equal to reltime
568-
#>\(eq interval length greater or equal reltime
569-
#> interval length greater than reltime
570-
&& intervals overlap
571-
<< A contains B
572-
\(eq equality
573-
<> interval bounded by two abstimes
574-
<?> abstime in tinterval
575-
| start of interval
576-
<#> convert to interval
577-
.fi
578-
421+
.in
422+
.PP
423+
.IR "psql"
424+
has a \ed command to show these operators.
425+
.PP
579426
.SH "FUNCTIONS"
580427
Many data types have functions available for conversion to other related types.
581428
In addition, there are some type-specific functions. Functions which are also
@@ -672,24 +519,23 @@ text
672519
trim characters from text
673520

674521
.fi
675-
676-
.SH "PSQL HELP"
677-
.IR "psq"
522+
.PP
523+
.SH "ADDITIONAL INFORMATION"
524+
.IR "psql"
678525
has a variety of \ed commands for showing system information.
679526
Consult those
680527
.IR "psql"
681528
commands for more listings.
682-
683-
.in
529+
.PP
684530
.SH "SEE ALSO"
685531
.IR set (l),
686532
.IR show (l),
687533
.IR reset (l),
688534
.IR psql (1).
689535
For examples on specifying literals of built-in types, see
690536
.IR SQL (l).
691-
.SH BUGS
692537
.PP
538+
.SH BUGS
693539
Although most of the input and output functions corresponding to the
694540
base types (e.g., integers and floating point numbers) do some
695541
error-checking, some are not particularly rigorous about it. More

0 commit comments

Comments
 (0)