pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-hackers@postgresql.org
Subject: Re: Compiler warnings
Date: Tue, 29 Nov 2016 10:25:38 -0500
Message-ID: <20161129152538.GS13284@tamriel.snowman.net> (raw)
In-Reply-To: <20161129152102.GR13284@tamriel.snowman.net>
References: <20161129152102.GR13284@tamriel.snowman.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

* Stephen Frost (sfrost@snowman.net) wrote:
> diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
> new file mode 100644
> index 884cdab..b5d97c8
> *** a/src/backend/utils/cache/plancache.c
> --- b/src/backend/utils/cache/plancache.c
> *************** GetCachedPlan(CachedPlanSource *plansour
> *** 1196,1204 ****
>   			 */
>   			qlist = NIL;
>   		}
> ! 	}
> ! 
> ! 	if (customplan)
>   	{
>   		/* Build a custom plan */
>   		plan = BuildCachedPlan(plansource, qlist, boundParams);
> --- 1196,1203 ----
>   			 */
>   			qlist = NIL;
>   		}
> ! 	} 
> ! 	else
>   	{
>   		/* Build a custom plan */
>   		plan = BuildCachedPlan(plansource, qlist, boundParams);

Meh, of course this isn't correct since we could change 'customplan'
inside the first if() block to be true, the right answer is really to
just do:

CachedPlan *plan = NULL;

at the top and keep it simple.

ENEEDMORECOFFEE.

Thanks!

Stephen

Attachments:

  [application/pgp-signature] signature.asc (818B, ../20161129152538.GS13284@tamriel.snowman.net/2-signature.asc)
  download

view thread (17+ messages)  latest in thread

Message-ID: <20161129152538.GS13284@tamriel.snowman.net>
Permalink:  ../20161129152538.GS13284@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20161129152538.GS13284@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sfrost@snowman.net
  Subject: Re: Compiler warnings
  In-Reply-To: <20161129152538.GS13284@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox