On Fri, Feb 12, 2016 at 3:45 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Andres Freund <and...@anarazel.de> writes: >> On 2016-02-11 13:37:17 -0500, Tom Lane wrote: >>> Absolutely; they don't work safely for testing bits that aren't in the >>> rightmost byte of a flag word, for instance. I'm on board with making >>> these fixes, I'm just unconvinced that stdbool is a good reason for it. > >> Oh, ok. Interactions with stdbool was what made me looking into this, >> that's primarily why I mentioned it. What's your thinking about >> back-patching, independent of that then? > > Well, Yury was saying upthread that some MSVC versions have a problem > with the existing coding, which would be a reason to back-patch ... > but I'd like to see a failing buildfarm member first. Don't particularly > want to promise to support compilers not represented in the farm.
Grmbl. Forgot to attach the rebased patch upthread. Here is it now. As of now the only complain has been related to MS2015 and MS2013. If we follow the pattern of cec8394b and [1], support to compile on newer versions of MSVC would be master and REL9_5_STABLE, but MS2013 is supported down to 9.3. Based on this reason, we would want to backpatch down to 9.3 the patch of this thread. [1]: http://www.postgresql.org/message-id/529d05cc.7070...@gmx.de -- Michael
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index b0d5440..3bbb218 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -5329,7 +5329,8 @@ xact_redo_commit(xl_xact_parsed_commit *parsed, LWLockRelease(XidGenLock); } - Assert(!!(parsed->xinfo & XACT_XINFO_HAS_ORIGIN) == (origin_id != InvalidRepOriginId)); + Assert(((parsed->xinfo & XACT_XINFO_HAS_ORIGIN) != 0) == + (origin_id != InvalidRepOriginId)); if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN) commit_time = parsed->origin_timestamp; diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 78acced..024929a 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -575,7 +575,7 @@ ReorderBufferTXNByXid(ReorderBuffer *rb, TransactionId xid, bool create, if (is_new) *is_new = !found; - Assert(!create || !!txn); + Assert(!create || txn != NULL); return txn; } diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index d245857..ef42fad 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -205,11 +205,11 @@ PRINT_LWDEBUG(const char *where, LWLock *lock, LWLockMode mode) errmsg_internal("%d: %s(%s): excl %u shared %u haswaiters %u waiters %u rOK %d", MyProcPid, where, MainLWLockNames[id], - !!(state & LW_VAL_EXCLUSIVE), + (state & LW_VAL_EXCLUSIVE) != 0, state & LW_SHARED_MASK, - !!(state & LW_FLAG_HAS_WAITERS), + (state & LW_FLAG_HAS_WAITERS) != 0, pg_atomic_read_u32(&lock->nwaiters), - !!(state & LW_FLAG_RELEASE_OK)))); + (state & LW_FLAG_RELEASE_OK) != 0))); else ereport(LOG, (errhidestmt(true), @@ -217,11 +217,11 @@ PRINT_LWDEBUG(const char *where, LWLock *lock, LWLockMode mode) errmsg_internal("%d: %s(%s %d): excl %u shared %u haswaiters %u waiters %u rOK %d", MyProcPid, where, T_NAME(lock), id, - !!(state & LW_VAL_EXCLUSIVE), + (state & LW_VAL_EXCLUSIVE) != 0, state & LW_SHARED_MASK, - !!(state & LW_FLAG_HAS_WAITERS), + (state & LW_FLAG_HAS_WAITERS) != 0, pg_atomic_read_u32(&lock->nwaiters), - !!(state & LW_FLAG_RELEASE_OK)))); + (state & LW_FLAG_RELEASE_OK) != 0))); } } diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index d2ea588..e212c9f 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -112,22 +112,22 @@ typedef struct GinMetaPageData */ #define GinPageGetOpaque(page) ( (GinPageOpaque) PageGetSpecialPointer(page) ) -#define GinPageIsLeaf(page) ( GinPageGetOpaque(page)->flags & GIN_LEAF ) +#define GinPageIsLeaf(page) ( (GinPageGetOpaque(page)->flags & GIN_LEAF) != 0 ) #define GinPageSetLeaf(page) ( GinPageGetOpaque(page)->flags |= GIN_LEAF ) #define GinPageSetNonLeaf(page) ( GinPageGetOpaque(page)->flags &= ~GIN_LEAF ) -#define GinPageIsData(page) ( GinPageGetOpaque(page)->flags & GIN_DATA ) +#define GinPageIsData(page) ( (GinPageGetOpaque(page)->flags & GIN_DATA) != 0 ) #define GinPageSetData(page) ( GinPageGetOpaque(page)->flags |= GIN_DATA ) -#define GinPageIsList(page) ( GinPageGetOpaque(page)->flags & GIN_LIST ) +#define GinPageIsList(page) ( (GinPageGetOpaque(page)->flags & GIN_LIST) != 0 ) #define GinPageSetList(page) ( GinPageGetOpaque(page)->flags |= GIN_LIST ) -#define GinPageHasFullRow(page) ( GinPageGetOpaque(page)->flags & GIN_LIST_FULLROW ) +#define GinPageHasFullRow(page) ( (GinPageGetOpaque(page)->flags & GIN_LIST_FULLROW) != 0 ) #define GinPageSetFullRow(page) ( GinPageGetOpaque(page)->flags |= GIN_LIST_FULLROW ) -#define GinPageIsCompressed(page) ( GinPageGetOpaque(page)->flags & GIN_COMPRESSED ) +#define GinPageIsCompressed(page) ( (GinPageGetOpaque(page)->flags & GIN_COMPRESSED) != 0 ) #define GinPageSetCompressed(page) ( GinPageGetOpaque(page)->flags |= GIN_COMPRESSED ) -#define GinPageIsDeleted(page) ( GinPageGetOpaque(page)->flags & GIN_DELETED) +#define GinPageIsDeleted(page) ( (GinPageGetOpaque(page)->flags & GIN_DELETED) != 0 ) #define GinPageSetDeleted(page) ( GinPageGetOpaque(page)->flags |= GIN_DELETED) #define GinPageSetNonDeleted(page) ( GinPageGetOpaque(page)->flags &= ~GIN_DELETED) -#define GinPageIsIncompleteSplit(page) ( GinPageGetOpaque(page)->flags & GIN_INCOMPLETE_SPLIT) +#define GinPageIsIncompleteSplit(page) ( (GinPageGetOpaque(page)->flags & GIN_INCOMPLETE_SPLIT) != 0 ) #define GinPageRightMost(page) ( GinPageGetOpaque(page)->rightlink == InvalidBlockNumber) @@ -224,7 +224,7 @@ typedef signed char GinNullCategory; #define GinGetPostingOffset(itup) (GinItemPointerGetBlockNumber(&(itup)->t_tid) & (~GIN_ITUP_COMPRESSED)) #define GinSetPostingOffset(itup,n) ItemPointerSetBlockNumber(&(itup)->t_tid,(n)|GIN_ITUP_COMPRESSED) #define GinGetPosting(itup) ((Pointer) ((char*)(itup) + GinGetPostingOffset(itup))) -#define GinItupIsCompressed(itup) (GinItemPointerGetBlockNumber(&(itup)->t_tid) & GIN_ITUP_COMPRESSED) +#define GinItupIsCompressed(itup) ((GinItemPointerGetBlockNumber(&(itup)->t_tid) & GIN_ITUP_COMPRESSED) != 0) /* * Maximum size of an item on entry tree page. Make sure that we fit at least diff --git a/src/include/access/gist.h b/src/include/access/gist.h index 4343d6f..f40e81b 100644 --- a/src/include/access/gist.h +++ b/src/include/access/gist.h @@ -129,22 +129,22 @@ typedef struct GISTENTRY #define GistPageGetOpaque(page) ( (GISTPageOpaque) PageGetSpecialPointer(page) ) -#define GistPageIsLeaf(page) ( GistPageGetOpaque(page)->flags & F_LEAF) +#define GistPageIsLeaf(page) ( (GistPageGetOpaque(page)->flags & F_LEAF) != 0) #define GIST_LEAF(entry) (GistPageIsLeaf((entry)->page)) -#define GistPageIsDeleted(page) ( GistPageGetOpaque(page)->flags & F_DELETED) +#define GistPageIsDeleted(page) ( (GistPageGetOpaque(page)->flags & F_DELETED) != 0) #define GistPageSetDeleted(page) ( GistPageGetOpaque(page)->flags |= F_DELETED) #define GistPageSetNonDeleted(page) ( GistPageGetOpaque(page)->flags &= ~F_DELETED) -#define GistTuplesDeleted(page) ( GistPageGetOpaque(page)->flags & F_TUPLES_DELETED) +#define GistTuplesDeleted(page) ( (GistPageGetOpaque(page)->flags & F_TUPLES_DELETED) != 0) #define GistMarkTuplesDeleted(page) ( GistPageGetOpaque(page)->flags |= F_TUPLES_DELETED) #define GistClearTuplesDeleted(page) ( GistPageGetOpaque(page)->flags &= ~F_TUPLES_DELETED) -#define GistPageHasGarbage(page) ( GistPageGetOpaque(page)->flags & F_HAS_GARBAGE) +#define GistPageHasGarbage(page) ( (GistPageGetOpaque(page)->flags & F_HAS_GARBAGE) != 0) #define GistMarkPageHasGarbage(page) ( GistPageGetOpaque(page)->flags |= F_HAS_GARBAGE) #define GistClearPageHasGarbage(page) ( GistPageGetOpaque(page)->flags &= ~F_HAS_GARBAGE) -#define GistFollowRight(page) ( GistPageGetOpaque(page)->flags & F_FOLLOW_RIGHT) +#define GistFollowRight(page) ((GistPageGetOpaque(page)->flags & F_FOLLOW_RIGHT) != 0) #define GistMarkFollowRight(page) ( GistPageGetOpaque(page)->flags |= F_FOLLOW_RIGHT) #define GistClearFollowRight(page) ( GistPageGetOpaque(page)->flags &= ~F_FOLLOW_RIGHT) diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h index 9f9cf2a..16fd4c6 100644 --- a/src/include/access/htup_details.h +++ b/src/include/access/htup_details.h @@ -214,7 +214,7 @@ struct HeapTupleHeaderData * Beware of multiple evaluations of the argument. */ #define HEAP_XMAX_IS_LOCKED_ONLY(infomask) \ - (((infomask) & HEAP_XMAX_LOCK_ONLY) || \ + (((infomask) & HEAP_XMAX_LOCK_ONLY) != 0 || \ (((infomask) & (HEAP_XMAX_IS_MULTI | HEAP_LOCK_MASK)) == HEAP_XMAX_EXCL_LOCK)) /* @@ -292,7 +292,7 @@ struct HeapTupleHeaderData #define HeapTupleHeaderXminCommitted(tup) \ ( \ - (tup)->t_infomask & HEAP_XMIN_COMMITTED \ + ((tup)->t_infomask & HEAP_XMIN_COMMITTED) != 0 \ ) #define HeapTupleHeaderXminInvalid(tup) \ @@ -476,7 +476,7 @@ do { \ #define HeapTupleHeaderIsHeapOnly(tup) \ ( \ - (tup)->t_infomask2 & HEAP_ONLY_TUPLE \ + ((tup)->t_infomask2 & HEAP_ONLY_TUPLE) != 0 \ ) #define HeapTupleHeaderSetHeapOnly(tup) \ @@ -491,7 +491,7 @@ do { \ #define HeapTupleHeaderHasMatch(tup) \ ( \ - (tup)->t_infomask2 & HEAP_TUPLE_HAS_MATCH \ + ((tup)->t_infomask2 & HEAP_TUPLE_HAS_MATCH) != 0 \ ) #define HeapTupleHeaderSetMatch(tup) \ diff --git a/src/include/access/itup.h b/src/include/access/itup.h index 8350fa0..18427d7 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -69,8 +69,8 @@ typedef IndexAttributeBitMapData *IndexAttributeBitMap; #define IndexTupleSize(itup) ((Size) (((IndexTuple) (itup))->t_info & INDEX_SIZE_MASK)) #define IndexTupleDSize(itup) ((Size) ((itup).t_info & INDEX_SIZE_MASK)) -#define IndexTupleHasNulls(itup) ((((IndexTuple) (itup))->t_info & INDEX_NULL_MASK)) -#define IndexTupleHasVarwidths(itup) ((((IndexTuple) (itup))->t_info & INDEX_VAR_MASK)) +#define IndexTupleHasNulls(itup) ((((IndexTuple) (itup))->t_info & INDEX_NULL_MASK) != 0) +#define IndexTupleHasVarwidths(itup) ((((IndexTuple) (itup))->t_info & INDEX_VAR_MASK) != 0) /* diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 06822fa..14a50c2 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -174,13 +174,13 @@ typedef struct BTMetaPageData */ #define P_LEFTMOST(opaque) ((opaque)->btpo_prev == P_NONE) #define P_RIGHTMOST(opaque) ((opaque)->btpo_next == P_NONE) -#define P_ISLEAF(opaque) ((opaque)->btpo_flags & BTP_LEAF) -#define P_ISROOT(opaque) ((opaque)->btpo_flags & BTP_ROOT) -#define P_ISDELETED(opaque) ((opaque)->btpo_flags & BTP_DELETED) -#define P_ISHALFDEAD(opaque) ((opaque)->btpo_flags & BTP_HALF_DEAD) -#define P_IGNORE(opaque) ((opaque)->btpo_flags & (BTP_DELETED|BTP_HALF_DEAD)) -#define P_HAS_GARBAGE(opaque) ((opaque)->btpo_flags & BTP_HAS_GARBAGE) -#define P_INCOMPLETE_SPLIT(opaque) ((opaque)->btpo_flags & BTP_INCOMPLETE_SPLIT) +#define P_ISLEAF(opaque) (((opaque)->btpo_flags & BTP_LEAF) != 0) +#define P_ISROOT(opaque) (((opaque)->btpo_flags & BTP_ROOT) != 0) +#define P_ISDELETED(opaque) (((opaque)->btpo_flags & BTP_DELETED) != 0) +#define P_ISHALFDEAD(opaque) (((opaque)->btpo_flags & BTP_HALF_DEAD) != 0) +#define P_IGNORE(opaque) (((opaque)->btpo_flags & (BTP_DELETED|BTP_HALF_DEAD)) != 0) +#define P_HAS_GARBAGE(opaque) (((opaque)->btpo_flags & BTP_HAS_GARBAGE) != 0) +#define P_INCOMPLETE_SPLIT(opaque) (((opaque)->btpo_flags & BTP_INCOMPLETE_SPLIT) != 0) /* * Lehman and Yao's algorithm requires a ``high key'' on every non-rightmost diff --git a/src/include/access/spgist_private.h b/src/include/access/spgist_private.h index cb8fa9c..097fd95 100644 --- a/src/include/access/spgist_private.h +++ b/src/include/access/spgist_private.h @@ -54,10 +54,10 @@ typedef SpGistPageOpaqueData *SpGistPageOpaque; #define SPGIST_NULLS (1<<3) #define SpGistPageGetOpaque(page) ((SpGistPageOpaque) PageGetSpecialPointer(page)) -#define SpGistPageIsMeta(page) (SpGistPageGetOpaque(page)->flags & SPGIST_META) -#define SpGistPageIsDeleted(page) (SpGistPageGetOpaque(page)->flags & SPGIST_DELETED) -#define SpGistPageIsLeaf(page) (SpGistPageGetOpaque(page)->flags & SPGIST_LEAF) -#define SpGistPageStoresNulls(page) (SpGistPageGetOpaque(page)->flags & SPGIST_NULLS) +#define SpGistPageIsMeta(page) ((SpGistPageGetOpaque(page)->flags & SPGIST_META) != 0) +#define SpGistPageIsDeleted(page) ((SpGistPageGetOpaque(page)->flags & SPGIST_DELETED) != 0) +#define SpGistPageIsLeaf(page) ((SpGistPageGetOpaque(page)->flags & SPGIST_LEAF) != 0) +#define SpGistPageStoresNulls(page) ((SpGistPageGetOpaque(page)->flags & SPGIST_NULLS) != 0) /* * The page ID is for the convenience of pg_filedump and similar utilities, @@ -607,7 +607,7 @@ typedef struct spgxlogVacuumRedirect #define GBUF_PARITY_MASK 0x03 #define GBUF_REQ_LEAF(flags) (((flags) & GBUF_PARITY_MASK) == GBUF_LEAF) -#define GBUF_REQ_NULLS(flags) ((flags) & GBUF_NULLS) +#define GBUF_REQ_NULLS(flags) (((flags) & GBUF_NULLS) != 0) /* spgutils.c */ extern SpGistCache *spgGetCache(Relation index); diff --git a/src/include/access/xact.h b/src/include/access/xact.h index ebeb582..3ba23f5 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -149,9 +149,9 @@ typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid, /* Access macros for above flags */ #define XactCompletionRelcacheInitFileInval(xinfo) \ - (!!(xinfo & XACT_COMPLETION_UPDATE_RELCACHE_FILE)) + ((xinfo & XACT_COMPLETION_UPDATE_RELCACHE_FILE) != 0) #define XactCompletionForceSyncCommit(xinfo) \ - (!!(xinfo & XACT_COMPLETION_FORCE_SYNC_COMMIT)) + ((xinfo & XACT_COMPLETION_FORCE_SYNC_COMMIT) != 0) typedef struct xl_xact_assignment { diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h index eb39c50..0f7c6b4 100644 --- a/src/include/catalog/pg_trigger.h +++ b/src/include/catalog/pg_trigger.h @@ -123,14 +123,14 @@ typedef FormData_pg_trigger *Form_pg_trigger; #define TRIGGER_SETT_UPDATE(type) ((type) |= TRIGGER_TYPE_UPDATE) #define TRIGGER_SETT_TRUNCATE(type) ((type) |= TRIGGER_TYPE_TRUNCATE) -#define TRIGGER_FOR_ROW(type) ((type) & TRIGGER_TYPE_ROW) +#define TRIGGER_FOR_ROW(type) (((type) & TRIGGER_TYPE_ROW) != 0) #define TRIGGER_FOR_BEFORE(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_BEFORE) #define TRIGGER_FOR_AFTER(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_AFTER) #define TRIGGER_FOR_INSTEAD(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_INSTEAD) -#define TRIGGER_FOR_INSERT(type) ((type) & TRIGGER_TYPE_INSERT) -#define TRIGGER_FOR_DELETE(type) ((type) & TRIGGER_TYPE_DELETE) -#define TRIGGER_FOR_UPDATE(type) ((type) & TRIGGER_TYPE_UPDATE) -#define TRIGGER_FOR_TRUNCATE(type) ((type) & TRIGGER_TYPE_TRUNCATE) +#define TRIGGER_FOR_INSERT(type) (((type) & TRIGGER_TYPE_INSERT) != 0) +#define TRIGGER_FOR_DELETE(type) (((type) & TRIGGER_TYPE_DELETE) != 0) +#define TRIGGER_FOR_UPDATE(type) (((type) & TRIGGER_TYPE_UPDATE) != 0) +#define TRIGGER_FOR_TRUNCATE(type) (((type) & TRIGGER_TYPE_TRUNCATE) != 0) /* * Efficient macro for checking if tgtype matches a particular level diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index 0ed7c86..79fe489 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -78,7 +78,7 @@ typedef struct TriggerData (((event) & TRIGGER_EVENT_OPMASK) == TRIGGER_EVENT_TRUNCATE) #define TRIGGER_FIRED_FOR_ROW(event) \ - ((event) & TRIGGER_EVENT_ROW) + (((event) & TRIGGER_EVENT_ROW) == TRIGGER_EVENT_ROW) #define TRIGGER_FIRED_FOR_STATEMENT(event) \ (!TRIGGER_FIRED_FOR_ROW(event)) diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h index 2ceffa6..6c8d950 100644 --- a/src/include/regex/regguts.h +++ b/src/include/regex/regguts.h @@ -212,7 +212,7 @@ struct colordesc int flags; /* bit values defined next */ #define FREECOL 01 /* currently free */ #define PSEUDO 02 /* pseudocolor, no real chars */ -#define UNUSEDCOLOR(cd) ((cd)->flags & FREECOL) +#define UNUSEDCOLOR(cd) (((cd)->flags & FREECOL) != 0) union tree *block; /* block of solid color, if any */ }; diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index 2ce3be7..23e9da7 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -349,21 +349,21 @@ typedef PageHeaderData *PageHeader; PageXLogRecPtrSet(((PageHeader) (page))->pd_lsn, lsn) #define PageHasFreeLinePointers(page) \ - (((PageHeader) (page))->pd_flags & PD_HAS_FREE_LINES) + ((((PageHeader) (page))->pd_flags & PD_HAS_FREE_LINES) != 0) #define PageSetHasFreeLinePointers(page) \ (((PageHeader) (page))->pd_flags |= PD_HAS_FREE_LINES) #define PageClearHasFreeLinePointers(page) \ (((PageHeader) (page))->pd_flags &= ~PD_HAS_FREE_LINES) #define PageIsFull(page) \ - (((PageHeader) (page))->pd_flags & PD_PAGE_FULL) + ((((PageHeader) (page))->pd_flags & PD_PAGE_FULL) != 0) #define PageSetFull(page) \ (((PageHeader) (page))->pd_flags |= PD_PAGE_FULL) #define PageClearFull(page) \ (((PageHeader) (page))->pd_flags &= ~PD_PAGE_FULL) #define PageIsAllVisible(page) \ - (((PageHeader) (page))->pd_flags & PD_ALL_VISIBLE) + ((((PageHeader) (page))->pd_flags & PD_ALL_VISIBLE) != 0) #define PageSetAllVisible(page) \ (((PageHeader) (page))->pd_flags |= PD_ALL_VISIBLE) #define PageClearAllVisible(page) \ diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h index 5f49d8d..2a860dd 100644 --- a/src/include/utils/jsonb.h +++ b/src/include/utils/jsonb.h @@ -214,9 +214,9 @@ typedef struct /* convenience macros for accessing the root container in a Jsonb datum */ #define JB_ROOT_COUNT(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_CMASK) -#define JB_ROOT_IS_SCALAR(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FSCALAR) -#define JB_ROOT_IS_OBJECT(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FOBJECT) -#define JB_ROOT_IS_ARRAY(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FARRAY) +#define JB_ROOT_IS_SCALAR(jbp_) ( (*(uint32*) VARDATA(jbp_) & JB_FSCALAR) != 0) +#define JB_ROOT_IS_OBJECT(jbp_) ( (*(uint32*) VARDATA(jbp_) & JB_FOBJECT) != 0) +#define JB_ROOT_IS_ARRAY(jbp_) ( (*(uint32*) VARDATA(jbp_) & JB_FARRAY) != 0) /*
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers