Re: BUG #2101: Postmaster Crash Using PL/PgSQL With %TYPE on Non-Exisiting Column - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2101: Postmaster Crash Using PL/PgSQL With %TYPE on Non-Exisiting Column
Date
Msg-id 29311.1134148215@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2101: Postmaster Crash Using PL/PgSQL With %TYPE on Non-Exisiting Column  ("Will Szopko" <dba@vilaj.com>)
List pgsql-bugs
"Will Szopko" <dba@vilaj.com> writes:
> The postmaster in 8.1.0 crashes when creating or replacing a PL/PgSQL
> function containing an invalid variable declaration.

Looks like a copy-and-paste mistake...

Index: pl_comp.c
===================================================================
RCS file: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v
retrieving revision 1.94.2.1
diff -c -r1.94.2.1 pl_comp.c
*** pl_comp.c    22 Nov 2005 18:23:30 -0000    1.94.2.1
--- pl_comp.c    9 Dec 2005 16:56:38 -0000
***************
*** 1457,1463 ****
  done:
      if (HeapTupleIsValid(classtup))
          ReleaseSysCache(classtup);
!     if (HeapTupleIsValid(classtup))
          ReleaseSysCache(attrtup);
      if (HeapTupleIsValid(typetup))
          ReleaseSysCache(typetup);
--- 1457,1463 ----
  done:
      if (HeapTupleIsValid(classtup))
          ReleaseSysCache(classtup);
!     if (HeapTupleIsValid(attrtup))
          ReleaseSysCache(attrtup);
      if (HeapTupleIsValid(typetup))
          ReleaseSysCache(typetup);


            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2102: Backend reports wrong number of affected rows for a table that uses rules
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #2100: CREATE TABLE AS - may not supply table specification