1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00

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.
This commit is contained in:
Tom Lane
2004-07-02 22:50:23 +00:00
parent 0b89d261c7
commit e34082ee3b
8 changed files with 48 additions and 93 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.99 2004/06/03 02:08:04 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.100 2004/07/02 22:49:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1531,18 +1531,6 @@ time_mi_interval(PG_FUNCTION_ARGS)
PG_RETURN_TIMEADT(result);
}
/* interval_pl_time()
* Add time to interval.
*/
Datum
interval_pl_time(PG_FUNCTION_ARGS)
{
Datum span = PG_GETARG_DATUM(0);
Datum time = PG_GETARG_DATUM(1);
return DirectFunctionCall2(time_pl_interval, time, span);
}
/* time_text()
* Convert time to text data type.