mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Incorporate examples and doc patches from Mark Kirkwood and David Fetter.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.76 2005/01/10 00:04:43 tgl Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.77 2005/01/14 01:16:52 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@@ -537,6 +537,17 @@ ALTER TABLE distributors
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To change an integer column containing UNIX timestamps to <type>timestamp
|
||||
with time zone</type> via a <literal>USING</literal> clause:
|
||||
<programlisting>
|
||||
ALTER TABLE foo
|
||||
ALTER COLUMN foo_timestamp TYPE timestamp with time zone
|
||||
USING
|
||||
timestamp with time zone 'epoch' + foo_timestamp * interval '1 second';
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To rename an existing column:
|
||||
<programlisting>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.12 2003/11/29 19:51:38 pgsql Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.13 2005/01/14 01:16:52 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@@ -205,6 +205,16 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Notes</title>
|
||||
|
||||
<para>
|
||||
The operators should not be defined by SQL functions. A SQL function
|
||||
is likely to be inlined into the calling query, which will prevent
|
||||
the optimizer from recognizing that the query matches an index.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Examples</title>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user