Re: BUG #19382: Server crash at __nss_database_lookup - Mailing list pgsql-bugs

From Zsolt Parragi
Subject Re: BUG #19382: Server crash at __nss_database_lookup
Date
Msg-id CAN4CZFM99uKZgZ8fY1vDPTMvmL5MVb19JRiOq95hZ-BUN28kiw@mail.gmail.com
Whole thread
In response to Re: BUG #19382: Server crash at __nss_database_lookup  (surya poondla <suryapoondla4@gmail.com>)
List pgsql-bugs
Hello!

The following still reproduces the crash with the patch:

create type foo as (a int, b int);
create function bar_rec() returns record as $$
declare r record;
begin
  r := row(123, power(2,30)::int4)::foo;
  alter type foo alter attribute b type text;
  return r;
end $$ language plpgsql;
select bar_rec();

And also, shouldn't the following still work?

create type inn2 as (x int, y int);
create type out2 as (a int, b inn2);
create function fp_test() returns out2 as $$
declare r out2;
begin
  r := row(1, row(10, 20)::inn2)::out2;
  alter type inn2 alter attribute y type text;
  r := row(1, row(10, 'hello')::inn2)::out2;
  return r;
end $$ language plpgsql;
select fp_test();
-- ERROR: cannot return record variable "r" after composite type
"inn2" was altered

but it only uses out2.



pgsql-bugs by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: BUG #19519: REPACK can fail due to missing chunk for toast value
Next
From: Michael Paquier
Date:
Subject: Re: BUG #19519: REPACK can fail due to missing chunk for toast value