Thread: Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed

Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed

From
"Paragon Corporation"
Date:
I wasn't sure if you guys knew or not, but this bug I complained about


http://www.postgresql.org/message-id/3367.1415311625@sss.pgh.pa.us


That would crash with this piece of code seems to have gone

CREATE OR REPLACE FUNCTION crash_test(table_name varchar, column_name
varchar)
  RETURNS bigint AS
$$
DECLARE
 var_result bigint;
BEGIN
       EXECUTE 'ALTER TABLE ' || quote_ident(table_name) || ' ADD COLUMN '
|| quote_ident(column_name) || ' text;';
       var_result = (random()*100000)::bigint;
       RETURN var_result;
END
$$
  LANGUAGE plpgsql VOLATILE
  COST 100;

DROP TABLE IF EXISTS test_1;
CREATE TABLE test_1(id serial primary key);
DROP TABLE IF EXISTS test_crash;
CREATE TEMP TABLE test_crash AS
SELECT 1 As id, crash_test('test_1', 'lyr1') As layer;

INSERT INTO test_crash(id, layer)
SELECT id + 1, crash_test('test_1', 'lyr' || (id + 1)::text)
FROM test_crash
WHERE id = 1;


-- I noticed it when our 9.5 weekly PostGIS bot tests started passing.

I'm guessing its been fixed for a week or so.


Thanks,
Regina

Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed

From
David G Johnston
Date:
Paragon Corporation wrote
> I wasn't sure if you guys knew or not, but this bug I complained about
>
>
> http://www.postgresql.org/message-id/3367.1415311625@sss.pgh.pa.us
>
>
> That would crash with this piece of code seems to have gone
>
> -- I noticed it when our 9.5 weekly PostGIS bot tests started passing.
>
> I'm guessing its been fixed for a week or so.

It appears Robert addressed this in c8df9477

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c8df9477f8ce48b202de989984f90dd78e1bba31

I am not sure why neither the bug report nor the commit reference the
other...

I read that commit as Robert addressing Tom's concern by stating that indeed
the behavior of the triggers changed and just the one specific site was
overlooked.

David J.




--
View this message in context:
http://postgresql.nabble.com/Re-BUG-11902-PostgreSQL-9-5-crashes-on-alter-table-in-function-seems-to-be-fixed-tp5828243p5828250.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.