Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > Also, can someone tell my why we use malloc in plpgsql?
>
> Plain palloc() won't do because the compiled tree for the function needs
> to outlive the current query. However, malloc() is not cool. Really,
> these structures ought to
Bruce Momjian wrote:
>
> Confirmed. I found a second problem in the file too, very similar.
> Patch applied.
Cut'n paste error. Thanks to both of you, good catch.
Jan
>
> > In this bit of code in src/pl/plpgsql/src/gram.y in the current CVS
> > sources, curname_def is defined as PLpgSQL_e
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > Also, can someone tell my why we use malloc in plpgsql?
>
> Plain palloc() won't do because the compiled tree for the function needs
> to outlive the current query. However, malloc() is not cool. Really,
> these structures ought to be built in a m
Bruce Momjian <[EMAIL PROTECTED]> writes:
> Also, can someone tell my why we use malloc in plpgsql?
Plain palloc() won't do because the compiled tree for the function needs
to outlive the current query. However, malloc() is not cool. Really,
these structures ought to be built in a memory contex
Also, can someone tell my why we use malloc in plpgsql?
> In this bit of code in src/pl/plpgsql/src/gram.y in the current CVS
> sources, curname_def is defined as PLpgSQL_expr * but it is is
> allocated the space required for a PLpgSQL_var. This looks like a
> bug.
>
> Ian
>
>
Confirmed. I found a second problem in the file too, very similar.
Patch applied.
> In this bit of code in src/pl/plpgsql/src/gram.y in the current CVS
> sources, curname_def is defined as PLpgSQL_expr * but it is is
> allocated the space required for a PLpgSQL_var. This looks like a
> bug.
>
In this bit of code in src/pl/plpgsql/src/gram.y in the current CVS
sources, curname_def is defined as PLpgSQL_expr * but it is is
allocated the space required for a PLpgSQL_var. This looks like a
bug.
Ian
| decl_varname K_CURSOR decl_cursor_args decl_is_from
K_