@@ -723,113 +723,41 @@ SELECT f, d, date_trunc(f, d) FROM valid_fields, inf_table WHERE NOT isfinite(d)
723723(10 rows)
724724
725725SELECT date_trunc('epoch', duration 'infinity');
726- date_trunc
727- ------------
728- infinity
729- (1 row)
730-
726+ ERROR: unit "epoch" not recognized for type duration
731727SELECT date_trunc('millennium', duration 'infinity');
732- date_trunc
733- ------------
734- infinity
735- (1 row)
736-
728+ ERROR: unit "millennium" not supported for type duration
737729SELECT date_trunc('century', duration 'infinity');
738- date_trunc
739- ------------
740- infinity
741- (1 row)
742-
730+ ERROR: unit "century" not supported for type duration
743731SELECT date_trunc('decade', duration 'infinity');
744- date_trunc
745- ------------
746- infinity
747- (1 row)
748-
732+ ERROR: unit "decade" not supported for type duration
749733SELECT date_trunc('year', duration 'infinity');
750- date_trunc
751- ------------
752- infinity
753- (1 row)
754-
734+ ERROR: unit "year" not supported for type duration
755735SELECT date_trunc('quarter', duration 'infinity');
756- date_trunc
757- ------------
758- infinity
759- (1 row)
760-
736+ ERROR: unit "quarter" not supported for type duration
761737SELECT date_trunc('month', duration 'infinity');
762- date_trunc
763- ------------
764- infinity
765- (1 row)
766-
738+ ERROR: unit "month" not supported for type duration
767739SELECT date_trunc('week', duration 'infinity');
768- date_trunc
769- ------------
770- infinity
771- (1 row)
772-
740+ ERROR: unit "week" not supported for type duration
773741SELECT date_trunc('day', duration 'infinity');
774- date_trunc
775- ------------
776- infinity
777- (1 row)
778-
742+ ERROR: unit "day" not supported for type duration
779743SELECT date_trunc('epoch', duration '-infinity');
780- date_trunc
781- ------------
782- -infinity
783- (1 row)
784-
744+ ERROR: unit "epoch" not recognized for type duration
785745SELECT date_trunc('millennium', duration '-infinity');
786- date_trunc
787- ------------
788- -infinity
789- (1 row)
790-
746+ ERROR: unit "millennium" not supported for type duration
791747SELECT date_trunc('century', duration '-infinity');
792- date_trunc
793- ------------
794- -infinity
795- (1 row)
796-
748+ ERROR: unit "century" not supported for type duration
797749SELECT date_trunc('decade', duration '-infinity');
798- date_trunc
799- ------------
800- -infinity
801- (1 row)
802-
750+ ERROR: unit "decade" not supported for type duration
803751SELECT date_trunc('year', duration '-infinity');
804- date_trunc
805- ------------
806- -infinity
807- (1 row)
808-
752+ ERROR: unit "year" not supported for type duration
809753SELECT date_trunc('quarter', duration '-infinity');
810- date_trunc
811- ------------
812- -infinity
813- (1 row)
814-
754+ ERROR: unit "quarter" not supported for type duration
815755SELECT date_trunc('month', duration '-infinity');
816- date_trunc
817- ------------
818- -infinity
819- (1 row)
820-
756+ ERROR: unit "month" not supported for type duration
821757SELECT date_trunc('week', duration '-infinity');
822- date_trunc
823- ------------
824- -infinity
825- (1 row)
826-
758+ ERROR: unit "week" not supported for type duration
827759SELECT date_trunc('day', duration '-infinity');
828- date_trunc
829- ------------
830- -infinity
831- (1 row)
832-
760+ ERROR: unit "day" not supported for type duration
833761-- date_part
834762SELECT f, d, date_part(f, d) FROM valid_fields, inf_table WHERE NOT isfinite(d);
835763 f | d | date_part
@@ -997,7 +925,6 @@ ERROR: duration out of range
997925SELECT sum(d) FROM inf_table;
998926ERROR: duration out of range
999927-- Overflow
1000- -- This matches PostgreSQL semantics, but is probably incorrect.
1001928SELECT duration '9223372036854775807 us';
1002929 duration
1003930----------
0 commit comments