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

From Kirill Reshke
Subject Re: BUG #19382: Server crash at __nss_database_lookup
Date
Msg-id CALdSSPi37EqQUjFvMPKHQiGcp6d+NptPcCYoCm7FhgSzbE6qbw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #19382: Server crash at __nss_database_lookup  (Kirill Reshke <reshkekirill@gmail.com>)
List pgsql-bugs
> In fact, this fails as fast as 'SELECT bar()' for me. Also, it fails
> for REL_14_STABLE, REL_16_STABLE, so, problem is for all supported
> versions

Below fails in same way:

"
CREATE TABLE foo  (a INT, b INT);
CREATE FUNCTION bar() RETURNS RECORD AS $$
DECLARE
r foo := ROW(1, 1);
BEGIN
ALTER table foo alter column b type text;
    RETURN r;
END;
$$ LANGUAGE plpgsql;
SELECT bar();
"

My current idea is that we should somehow reject the ALTER type if it
is used to declare part of a function. Maybe exec_assign_expr should
report all types that are used to evaluate expressions in the declare
part?

-- 
Best regards,
Kirill Reshke



pgsql-bugs by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: BUG #19382: Server crash at __nss_database_lookup
Next
From: Rahila Syed
Date:
Subject: Re: BUG #19384: Server crash at textout