| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Emanuel Calvo <3manuek(at)esdebian(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: BRIN indexes - TRAP: BadArgument |
| Date: | 2014-11-08 03:27:14 |
| Message-ID: | 20141108032714.GX1791@alvin.alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > I'm having problems getting this to compile on MSVC. Attached is a patch
> > which fixes the problem.
>
> The committed code is completely broken on compilers that don't accept
> varargs macros, and this patch will not make them happier.
I tried to make it fire only on GCC, which is known to support variadic
macros, but I evidently failed.
> Probably what needs to happen is to put extra parentheses into the call
> sites, along the lines of
>
> #ifdef BRIN_DEBUG
> #define BRIN_elog(args) elog args
> #else
> #define BRIN_elog(args) ((void) 0)
> #endif
>
>
> BRIN_elog((LOG, "fmt", ...));
That works for me, thanks for the suggestion.
> Or we could decide we don't need this debugging crud anymore and just
> nuke it all.
I'm removing one which seems pointless, but keeping the others for now.
We can always remove them later. (I also left BRIN_DEBUG turned on by
default; I'm turning it off.)
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2014-11-08 04:27:56 | Re: row_to_json bug with index only scans: empty keys! |
| Previous Message | Robert Haas | 2014-11-08 02:49:41 | Re: [PATCH] HINT: pg_hba.conf changed since last config reload |