Re: Wrong results from function that selects from vier after "created or replace"

From: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong results from function that selects from vier after "created or replace"
Date: 2020-10-13 01:26:14
Message-ID: E18C9B4D-1BD9-4085-9821-45B1ED93F07D@yugabyte.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Why are my functions not immutable? They merely select, and have no side-effects. This meets the criteria documented here:

https://www.postgresql.org/docs/12/xfunc-volatility.html

I hadn’t realized that submitting a bug as the doc at www.postgresql.org/docs/12/bug-reporting.html seems to suggest is the recommended method (“In general, send bug reports to the bug report mailing list at <pgsql-bugs(at)lists(dot)postgresql(dot)org>…”) would _never_ result in a bug being filed (even if it’s acknowledged to be a bug). So thanks for that tip off!

david(dot)g(dot)johnston(at)gmail(dot)com wrote:

On Mon, Oct 12, 2020 at 5:01 PM Bryn Llewellyn <bryn(at)yugabyte(dot)com <mailto:bryn(at)yugabyte(dot)com>> wrote:
WRONG RESULTS FROM FUNCTION THAT SELECTS FROM VIER AFTER "CREATED OR REPLACE"

The attached self-contained testcase, "pg-bad-invalidation-bug.sql", seems to me definitely to demonstrate a bug. I've attached the spooled output as "pg-bad-invalidation-bug.txt" Do you agree that this is a bug?

Haven't experimented myself but the function declarations are themselves wrong - they are not immutable.

Please use the information here to file it.
What's the number of, and URL to, the newly-filed bug?

You've just filed a bug report. Since you did so directly instead of using the form it doesn't get assigned a bug number. All email sent to this list, or bugs filed using the form, get publicly posted to the mailing list and are archived as described on the mailing list related web pages. This is the permanent link for this thread in the archive:

https://www.postgresql.org/message-id/flat/4DE6C9D8-77A5-4858-82CB-18728F59D715%40yugabyte.com <https://www.postgresql.org/message-id/flat/4DE6C9D8-77A5-4858-82CB-18728F59D715%40yugabyte.com>

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2020-10-13 01:35:07 Re: Wrong results from function that selects from vier after "created or replace"
Previous Message Bryn Llewellyn 2020-10-13 01:15:21 Re: Wrong results from function that selects from vier after "created or replace"