Re: GinPageIs* don't actually return a boolean - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: GinPageIs* don't actually return a boolean
Date
Msg-id 20150811164919.GA3040@postgresql.org
Whole thread Raw
In response to Re: GinPageIs* don't actually return a boolean  (Andres Freund <andres@anarazel.de>)
Responses Re: GinPageIs* don't actually return a boolean
List pgsql-hackers
Andres Freund wrote:
> On 2015-08-11 12:43:03 -0400, Robert Haas wrote:
> > On Tue, Aug 11, 2015 at 12:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > > We do not use !! elsewhere for this purpose, and I for one find it a
> > > pretty ugly locution.
> > 
> > We do, actually, now, in contrib/pg_xlogdump/pg_xlogdump.c.  I'd be in
> > favor of getting rid of those.
> 
> And a bunch more places actually. Blame me. I'll come up with a patch
> fixing the macros and converting existing !! style ones.

Actually there's one that's not yours ...

alvin: master 0$ git grep '!!' -- \*.c | grep -v '!!!'
contrib/isn/isn.c: * It's a helper function, not intended to be used!!
contrib/sepgsql/uavc.c:         sepgsql_audit_log(!!denied,
src/backend/access/gist/gist.c:                                 /* yes!!, found */
src/backend/access/gist/gist.c:          * awful!!, we need search tree to find parent ... , but before we
src/backend/access/gist/gistbuild.c:                    /* yes!!, found it */
src/backend/access/transam/xact.c:      Assert(!!(parsed->xinfo & XACT_XINFO_HAS_ORIGIN) == (origin_id !=
InvalidRepOriginId));
src/backend/executor/nodeModifyTable.c:                                                                 * ctid!! */
src/backend/replication/logical/reorderbuffer.c:        Assert(!create || !!txn);
src/backend/storage/lmgr/lwlock.c:                                              !!(state & LW_VAL_EXCLUSIVE),
src/backend/storage/lmgr/lwlock.c:                                              !!(state & LW_FLAG_HAS_WAITERS),
src/backend/storage/lmgr/lwlock.c:                                              !!(state & LW_FLAG_RELEASE_OK))));
src/backend/tsearch/wparser_def.c: * order must be the same as in typedef enum {} TParserState!!
src/backend/utils/adt/like.c: *         A big hack of the regexp.c code!! Contributed by
src/bin/pg_ctl/pg_ctl.c: * manager checkpoint, it's got nothing to do with database checkpoints!!
src/interfaces/ecpg/preproc/c_keywords.c: * !!WARNING!!: This list must be sorted, because binary
src/interfaces/ecpg/preproc/ecpg_keywords.c: * !!WARNING!!: This list must be sorted, because binary
src/pl/plpgsql/src/pl_scanner.c: * !!WARNING!!: These lists must be sorted by ASCII name, because binary

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: WIP: SCRAM authentication
Next
From: Robert Haas
Date:
Subject: Re: Moving SS_finalize_plan processing to the end of planning