Re: [bugfix] sepgsql didn't follow the latest core API changes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bugfix] sepgsql didn't follow the latest core API changes
Date: 2012-09-05 18:02:50
Message-ID: CA+TgmoY=EBAutO-wLZx0zkyJgGJk_ZivMWbpMMC4wv1VCnnk3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 2, 2012 at 2:53 PM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> This patch fixes a few portions on which sepgsql didn't follow the latest
> core API changes.
>
> 1) Even though the prototype of ProcessUtility_hook was recently changed,
> sepgsql side didn't follow this update, so it made build failed.
>
> 2) sepgsql internally uses GETSTRUCT() and HeapTupleGetOid() macro
> these were moved to htup_details.h, so it needs an additional #include
> for "access/htup_defails.h".
>
> 3) sepgsql internally used a bool typed variable named "abort".
> I noticed it conflicts with ereport macro because it internally expanded to
> ereport_domain that contains invocation of "abort()". So, it renamed this
> variables to abort_on_violation.
>
> #define ereport_domain(elevel, domain, rest) \
> (errstart(elevel, __FILE__, __LINE__, PG_FUNCNAME_MACRO, domain) ? \
> (errfinish rest) : (void) 0), \
> ((elevel) >= ERROR ? abort() : (void) 0)
>
> This does not affect to v9.2, so please apply it on the master branch.

I have committed this untested. It seems pretty mechanical and I
assume that you tested it. Anyway, it's certainly broken without the
patch.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-09-05 19:17:40 Re: pg_upgrade diffs on WIndows
Previous Message Andres Freund 2012-09-05 17:32:13 Re: plperl sigfpe reset can crash the server