File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.71 2002/09/02 02:47:04 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.72 2002/09/03 22:55:54 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -2871,7 +2871,11 @@ timestamp_part(PG_FUNCTION_ARGS)
2871
2871
switch (val )
2872
2872
{
2873
2873
case DTK_EPOCH :
2874
+ #ifdef HAVE_INT64_TIMESTAMP
2874
2875
result = ((timestamp - SetEpochTimestamp ()) / 1000000e0 );
2876
+ #else
2877
+ result = timestamp - SetEpochTimestamp ();
2878
+ #endif
2875
2879
break ;
2876
2880
2877
2881
case DTK_DOW :
@@ -3052,7 +3056,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
3052
3056
{
3053
3057
case DTK_EPOCH :
3054
3058
#ifdef HAVE_INT64_TIMESTAMP
3055
- result = ((timestamp - SetEpochTimestamp ()) / 100000e0 );
3059
+ result = ((timestamp - SetEpochTimestamp ()) / 1000000e0 );
3056
3060
#else
3057
3061
result = timestamp - SetEpochTimestamp ();
3058
3062
#endif
You can’t perform that action at this time.
0 commit comments