]> granicus.if.org Git - postgresql/commitdiff
Add documentation for reset, set, and show, and cross-reference in built-in.
authorThomas G. Lockhart <lockhart@fourpalms.org>
Fri, 16 May 1997 07:13:54 +0000 (07:13 +0000)
committerThomas G. Lockhart <lockhart@fourpalms.org>
Fri, 16 May 1997 07:13:54 +0000 (07:13 +0000)
src/man/built-in.3
src/man/reset.l [new file with mode: 0644]
src/man/set.l [new file with mode: 0644]
src/man/show.l [new file with mode: 0644]

index 84e3c80827f2febdd8c3899cd2c595ef8379010b..f516863303d0d661f47fec28d2d6a7a8083ea212 100644 (file)
@@ -1,6 +1,6 @@
 .\" This is -*-nroff-*-
 .\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/src/man/Attic/built-in.3,v 1.6 1997/04/27 19:26:24 thomas Exp $
+.\" $Header: /cvsroot/pgsql/src/man/Attic/built-in.3,v 1.7 1997/05/16 07:13:46 thomas Exp $
 .TH BUILT-INS INTRO 04/01/97 PostgreSQL PostgreSQL
 .SH "DESCRIPTION"
 This section describes the data types, functions and operators
@@ -79,9 +79,25 @@ types are either unique to Postgres, such as open and closed paths, or have
 several possibilities for formats, such as date and time types.
 
 .SH "Syntax of date and time types"
+Some date and time types share code for data input. For those types (currently
+.IR datetime
+and
+.IR abstime )
+the input can have any of a wide variety of styles. For numeric date representations,
+European and US conventions can differ, and the proper interpretation is obtained
+by using the
+.IR set (l)
+command before entering data.
+Output formats can be set to one of three styles: 
+ISO-8601, SQL (traditional Oracle/Ingres), and traditional
+Postgres (see section on
+.IR "absolute time" )
+with the SQL style having European and US variants (see
+.IR set (l)).
+
 .SH "DATETIME"
 General-use date and time is input using a wide range of
-syntaxes, including ISO-compatible, SQL-compatible, traditional
+styles, including ISO-compatible, SQL-compatible, traditional
 Postgres (see section on
 .IR "absolute time")
 and other permutations of date and time. Output styles can be ISO-compatible,
@@ -1053,20 +1069,21 @@ sum    |int2
 sum    |int4
 sum    |money
 
-\fBcount\fR is also available, where
-.BR count(*)
-returns a count of all rows while
-.BR count(column_name)
-returns a count of all non-null fields in the specified column.
-
 .fi
+\fBcount\fR is also available, where \fBcount(*)\fR returns a count of all
+rows while \fBcount(column_name)\fR returns a count of all non-null fields
+in the specified column.
+
 .in
 .SH "SEE ALSO"
+.IR set (l),
+.IR show (l),
+.IR reset (l).
 For examples on specifying literals of built-in types, see
-.IR SQL(l).
+.IR SQL (l).
 .SH BUGS
 .PP
-Although most of the input and output functions correponding to the
+Although most of the input and output functions corresponding to the
 base types (e.g., integers and floating point numbers) do some
 error-checking, some are not particularly rigorous about it.  More
 importantly, few of the operators and functions (e.g.,
diff --git a/src/man/reset.l b/src/man/reset.l
new file mode 100644 (file)
index 0000000..5fd35db
--- /dev/null
@@ -0,0 +1,39 @@
+.\" This is -*-nroff-*-
+.\" XXX standard disclaimer belongs here....
+.\" $Header: /cvsroot/pgsql/src/man/Attic/reset.l,v 1.1 1997/05/16 07:13:49 thomas Exp $
+.TH RESET SQL 05/14/97 PostgreSQL PostgreSQL
+.SH NAME
+reset \(em restore run-time parameters for session to default values
+.SH SYNOPSIS
+.nf
+\fBreset\fR variable
+.fi
+.SH DESCRIPTION
+.BR Reset
+will display the current configuration parameters for
+.IR variable 
+during a session.
+.PP
+The session can be configured using
+.IR set (l),
+and values can be displayed using
+.IR show (l).
+Parameters and values are case-insensitive.
+.PP
+See
+.IR set (l)
+for more information on available variables.
+
+.SH EXAMPLES
+.nf
+tgl=> reset DateStyle;
+RESET VARIABLE
+tgl=> reset GEQO;
+RESET VARIABLE
+.fi
+.SH "SEE ALSO"
+built-in(3),
+set(l),
+show(l).
+.SH BUGS
+TBD
diff --git a/src/man/set.l b/src/man/set.l
new file mode 100644 (file)
index 0000000..47c42ef
--- /dev/null
@@ -0,0 +1,85 @@
+.\" This is -*-nroff-*-
+.\" XXX standard disclaimer belongs here....
+.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.1 1997/05/16 07:13:52 thomas Exp $
+.TH SET SQL 05/14/97 PostgreSQL PostgreSQL
+.SH NAME
+set \(em set run-time parameters for session
+.SH SYNOPSIS
+.nf
+\fBset\fR variable \fBto\fR 'value1[,value2 ...]'
+.fi
+.SH DESCRIPTION
+.BR Set
+will modify configuration parameters for
+.IR variable 
+during a session.
+.PP
+Current values can be obtained using
+.IR show (l),
+and values can be restored to the defaults using
+.IR reset (l).
+Parameters and values are case-insensitive.
+Note that the value field is always specified as a string, so
+is enclosed in single-quotes.
+.PP
+.IR DateStyle
+determines the output format for the date and time data types.
+See
+.IR "built-in" (3)
+for more information on available styles.
+
+.if n .ta 5 +15 +40
+.if t .ta 0.5i +1.5i +3.0i
+.in 0
+.nf
+DateStyle
+       ISO     - use ISO 8601-style dates and times
+       SQL     - use Oracle/Ingres-style dates and times
+       Postgres        - use traditional Postgres format
+       European        - use dd/mm/yyyy for numeric date representations.
+       NonEuropean     - use mm/dd/yyyy for numeric date representations.
+       US      - same as 'NonEuropean'
+       default - restores the default values ('US,Postgres')
+.fi
+.PP
+.IR GEQO
+enables or disables the genetic optimizer algorithm. This algorithm is
+.IR on
+by default. See the GEQO README for more information.
+
+.if n .ta 5 +15 +40
+.if t .ta 0.5i +1.5i +3.0i
+.in 0
+.nf
+GEQO
+       on      - turn the genetic optimizer 'on'
+       off     - duh
+.fi
+
+.SH EXAMPLES
+.nf
+--
+--Set the style of date to ISO
+--
+set DateStyle to 'ISO'
+.fi
+.PP
+.nf
+--
+--Set the style of date to SQL with European conventions
+--
+set DateStyle to 'SQL,European'
+.fi
+.PP
+.nf
+--
+--Turn off the genetic optimizer
+--
+set GEQO to 'off'
+.fi
+.SH "SEE ALSO"
+built-in(3),
+reset(l),
+show(l).
+.SH BUGS
+Of course.
diff --git a/src/man/show.l b/src/man/show.l
new file mode 100644 (file)
index 0000000..64e337b
--- /dev/null
@@ -0,0 +1,41 @@
+.\" This is -*-nroff-*-
+.\" XXX standard disclaimer belongs here....
+.\" $Header: /cvsroot/pgsql/src/man/Attic/show.l,v 1.1 1997/05/16 07:13:54 thomas Exp $
+.TH SHOW SQL 05/14/97 PostgreSQL PostgreSQL
+.SH NAME
+show \(em show run-time parameters for session
+.SH SYNOPSIS
+.nf
+\fBshow\fR variable
+.fi
+.SH DESCRIPTION
+.BR Show
+will display the current configuration parameters for
+.IR variable 
+during a session.
+.PP
+The session can be configured using
+.IR set (l),
+and values can be restored to the defaults using
+.IR reset (l).
+Parameters and values are case-insensitive.
+.PP
+See
+.IR set (l)
+for more information on available variables.
+
+.SH EXAMPLES
+.nf
+tgl=> show DateStyle;
+NOTICE:DateStyle is Postgres with US (NonEuropean) conventions
+SHOW VARIABLE
+tgl=> show GEQO;
+NOTICE:GEQO is ON
+SHOW VARIABLE
+.fi
+.SH "SEE ALSO"
+built-in(3),
+reset(l),
+set(l).
+.SH BUGS
+TBD