Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: server crash on recursive function invocation



Ali Baba said:
>
> hi,
> i was just trying recursive function invocation and got a server crash
> when i changed a GUC variable max_stack_depth,  to a high number.
> fallowing is what i have tried.
>
> select max_val from pg_settings where name='max_stack_depth'; --
> returns 2097151 set max_stack_depth=2097151;
> CREATE OR REPLACE FUNCTION func() RETURNS INT AS $$
> DECLARE
> x int;
> BEGIN
>  null;
>  x := func();
>  return 0;
> END;
> $$ LANGUAGE PLPGSQL;
> select func();
> and the server get crashed.
>
>
> Any ideas?
>


what the heck did you expect with an infinitely recursive function?

cheers

andrew





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group