Skip to content

Commit 754c7d5

Browse files
committed
Fix LLONG_MAX define used by new int64 FETCH/MOVE patch.
1 parent b0e5468 commit 754c7d5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/backend/tcop/pquery.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.108 2006/09/02 18:17:17 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.109 2006/09/03 01:15:40 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1347,7 +1347,7 @@ DoPortalRunFetch(Portal portal,
13471347
* we are. In any case, we arrange to fetch the target row
13481348
* going forwards.
13491349
*/
1350-
if (portal->posOverflow || portal->portalPos == LLONG_MAX ||
1350+
if (portal->posOverflow || portal->portalPos == FETCH_ALL ||
13511351
count - 1 <= portal->portalPos / 2)
13521352
{
13531353
DoPortalRewind(portal);

src/include/nodes/parsenodes.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.327 2006/09/02 18:17:17 momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.328 2006/09/03 01:15:40 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#ifndef PARSENODES_H
1515
#define PARSENODES_H
1616

17+
#include "limits.h"
18+
1719
#include "nodes/primnodes.h"
1820
#include "nodes/value.h"
1921

@@ -1439,7 +1441,12 @@ typedef enum FetchDirection
14391441
FETCH_RELATIVE
14401442
} FetchDirection;
14411443

1444+
#ifdef HAVE_INT64
14421445
#define FETCH_ALL LLONG_MAX
1446+
#else
1447+
#define FETCH_ALL LONG_MAX
1448+
#endif
1449+
14431450

14441451
typedef struct FetchStmt
14451452
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy