summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-08-02 01:25:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-08-02 01:25:02 +0000
commit12dbe763f31af809731a0cc2493a08091bebd4ea (patch)
tree247e5abaa4761407d598ffa77a028bfd90bc81f2 /src
parent727117fe4e170ae860fe18d01377d0a46c4d94f2 (diff)
Fix an ancient typo that prevented the detection of conflicting fields when
interval input "invalid" was specified together with other fields. Spotted by Neil Conway with the help of a clang warning. Although this has been wrong since the interval code was written more than 10 years ago, it doesn't affect anything beyond which error message you get for a wrong input, so not worth back-patching very far.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/datetime.c4
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 65d2b875f07..8e342a9837f 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.212 2010/05/09 02:15:59 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.212.2.1 2010/08/02 01:25:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3098,7 +3098,7 @@ DecodeInterval(char **field, int *ftype, int nf, int range,
break;
case RESERV:
- tmask = (DTK_DATE_M || DTK_TIME_M);
+ tmask = (DTK_DATE_M | DTK_TIME_M);
*dtype = val;
break;
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index b9894d7ffc8..b382cc49bf8 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/interval.c,v 1.42 2009/09/03 09:59:20 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/interval.c,v 1.42.10.1 2010/08/02 01:25:02 tgl Exp $ */
#include "postgres_fe.h"
#include <time.h>
@@ -606,7 +606,7 @@ DecodeInterval(char **field, int *ftype, int nf, /* int range, */
break;
case RESERV:
- tmask = (DTK_DATE_M || DTK_TIME_M);
+ tmask = (DTK_DATE_M | DTK_TIME_M);
*dtype = val;
break;