Re: BUG #12869: PostGIS 2.2 can't compile against 9.5 dev branch

From: "Paragon Corporation" <lr(at)pcorp(dot)us>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #12869: PostGIS 2.2 can't compile against 9.5 dev branch
Date: 2015-03-22 08:28:49
Message-ID: 001c01d0647a$397bb260$ac731720$@pcorp.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> According to the C and POSIX standards, DBL_DIG is defined by <float.h>.
> It sounds like you were indirectly depending on some Postgres header to
> #include that, and said header no longer does. I'm not sure what bit
> of refactoring might've had such an effect, but it doesn't much matter
> --- you really ought to #include <float.h> for yourself.

Tom,

Thanks for the response. We were able to fix that issue by adding a
<float.h> that was missing in one of our files.
That unfortunately unearthed another failure when it got to regression
testing which I have logged here: http://trac.osgeo.org/postgis/ticket/3080

It seems that under some conditions functions are being called multiple
times causing additional NOTICES to be emitted. This is causing a failure
in one of our raster tests.

In prior versions they were emitted only once (I assume they were only
called once). I've come up with a simple example that doesn't involve
PostGIS to replicate the issue.

CREATE OR REPLACE FUNCTION dummy_notice(variadic integer[]) RETURNS
integer[] AS
$$
BEGIN
RAISE NOTICE 'This is a dummy notice';
RETURN $1;
END;
$$
language plpgsql IMMUTABLE STRICT;

SELECT v[1] As v1, v[2] As v2, v[3] As v3
FROM
(SELECT dummy_notice(1,2,3) As v) As t;

In prior versions of PostgreSQL, this simple test would just emit:

NOTICE: This is a dummy notice

In PostgreSQL 9.5 as of when I had reported the original issue, it emits for
every single column in the outter output.
NOTICE: This is a dummy notice
NOTICE: This is a dummy notice
NOTICE: This is a dummy notice

I presume that means the dummy_notice function is now being called 3 times
for the above.

This behavior started when I reported the float issue and is still doing
that with latest PostgreSQL 9.5 snapshot.

I'm not sure if this is an intended change or a side-effect of something
else that needs checking.

Thanks,
Regina

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2015-03-22 09:07:35 Re: BUG #12869: PostGIS 2.2 can't compile against 9.5 dev branch
Previous Message Michael Paquier 2015-03-22 05:45:32 Re: ALTER TABLE documentation or parser bug