diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-07-02 22:50:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-07-02 22:50:23 +0000 |
commit | e34082ee3b07c0cf483e0bc5b8e25cc882e19ddc (patch) | |
tree | 39b35a9041aaa1da930c1702ce434e175d3a029c /doc/src | |
parent | 0b89d261c7a91ff9ebc6a6b9bd3ee129576bdd9a (diff) | |
download | postgresql-e34082ee3b07c0cf483e0bc5b8e25cc882e19ddc.tar.gz postgresql-e34082ee3b07c0cf483e0bc5b8e25cc882e19ddc.zip |
Add missing operators of the form interval-plus-datetime, as required for
better SQL compliance in this area, per recent discussion. Mark related
operators as commutators where possible. (The system doesn't actually care
about commutator marking for operators not returning boolean, at the moment,
but this seems forward-thinking and besides it made it easier to verify
that we hadn't missed any.)
Also, remove interval-minus-time and interval-minus-timetz operators.
I'm not sure how these got in, but they are nonstandard and had very
obviously broken behavior. (minus is not commutative in anyone's book.)
I doubt anyone had ever used 'em, because we'd surely have gotten a bug
report about it if so.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 8a624614e8d..cb7a5a00d98 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.212 2004/07/02 18:59:20 joe Exp $ +$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.213 2004/07/02 22:49:45 tgl Exp $ PostgreSQL documentation --> @@ -4689,7 +4689,10 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation> All the functions and operators described below that take <type>time</type> or <type>timestamp</type> inputs actually come in two variants: one that takes <type>time with time zone</type> or <type>timestamp with time zone</type>, and one that takes <type>time without time zone</type> or <type>timestamp without time zone</type>. - For brevity, these variants are not shown separately. + For brevity, these variants are not shown separately. Also, the + <literal>+</> and <literal>*</> operators come in commutative pairs (for + example both date + integer and integer + date); we show only one of each + such pair. </para> <table id="operators-datetime-table"> @@ -4725,12 +4728,6 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation> <row> <entry> <literal>+</literal> </entry> - <entry><literal>time '03:00' + date '2001-09-28'</literal></entry> - <entry><literal>timestamp '2001-09-28 03:00'</literal></entry> - </row> - - <row> - <entry> <literal>+</literal> </entry> <entry><literal>interval '1 day' + interval '1 hour'</literal></entry> <entry><literal>interval '1 day 01:00'</literal></entry> </row> @@ -4748,12 +4745,6 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation> </row> <row> - <entry> <literal>+</literal> </entry> - <entry><literal>interval '3 hours' + time '01:00'</literal></entry> - <entry><literal>time '04:00'</literal></entry> - </row> - - <row> <entry> <literal>-</literal> </entry> <entry><literal>- interval '23 hours'</literal></entry> <entry><literal>interval '-23:00'</literal></entry> @@ -4803,24 +4794,12 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation> <row> <entry> <literal>-</literal> </entry> - <entry><literal>interval '2 hours' - time '05:00'</literal></entry> - <entry><literal>time '03:00'</literal></entry> - </row> - - <row> - <entry> <literal>-</literal> </entry> <entry><literal>timestamp '2001-09-29 03:00' - timestamp '2001-09-27 12:00'</literal></entry> <entry><literal>interval '1 day 15:00'</literal></entry> </row> <row> <entry> <literal>*</literal> </entry> - <entry><literal>double precision '3.5' * interval '1 hour'</literal></entry> - <entry><literal>interval '03:30'</literal></entry> - </row> - - <row> - <entry> <literal>*</literal> </entry> <entry><literal>interval '1 hour' * double precision '3.5'</literal></entry> <entry><literal>interval '03:30'</literal></entry> </row> @@ -7332,7 +7311,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <row> <entry><literal><function>pg_tablespace_databases</function>(<parameter>tablespace_oid</parameter>)</literal></entry> <entry><type>setof oid</type></entry> - <entry>get set of database oids that have objects in the tablespace</entry> + <entry>get set of database OIDs that have objects in the tablespace</entry> </row> </tbody> </tgroup> @@ -7373,12 +7352,13 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); <para> <function>pg_tablespace_databases</function> allows usage examination of a - tablespace. It will return a set of database oids, that have objects + tablespace. It will return a set of OIDs of databases that have objects stored in the tablespace. If this function returns any row, the - tablespace is assumed not to be empty and cannot be dropped. To - display the actual objects populating the tablespace, you will need - to connect to the databases returned by - <function>pg_tablespace_databases</function> to query pg_class. + tablespace is not empty and cannot be dropped. To + display the specific objects populating the tablespace, you will need + to connect to the databases identified by + <function>pg_tablespace_databases</function> and query their + <structname>pg_class</> catalogs. </para> <indexterm zone="functions-misc"> |