Re: PL/R regression on windows, but not linux with master.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Dave Cramer <davecramer(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PL/R regression on windows, but not linux with master.
Date: 2021-04-11 14:13:23
Message-ID: 2667316.1618150403@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> Well, plr.h does this:
>>
>> #define WARNING 19
>> #define ERROR 20

> The coding pattern in plr.h looks quite breakable. Instead of hard
> coding values like this they should save the value from the postgres
> headers in another variable before undefining it and then restore that
> value after inclusion of the R headers.

Indeed. elog.h already provides a "PGERROR" macro to use for restoring
the value of ERROR. We have not heard of a need to do anything special
for WARNING though --- maybe that's R-specific?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rémi Lapeyre 2021-04-11 14:35:12 Re: Add header support to text format and matching feature
Previous Message Zhihong Yu 2021-04-11 13:28:21 Re: Add header support to text format and matching feature