From: | Alex Pilosov <alex(at)pilosoft(dot)com> |
---|---|
To: | Jan Wieck <JanWieck(at)yahoo(dot)com> |
Cc: | Hannu Krosing <hannu(at)tm(dot)ee>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: functions returning records |
Date: | 2001-06-28 01:24:09 |
Message-ID: | Pine.BSO.4.10.10106272122030.7004-100000@spider.pilosoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 27 Jun 2001, Jan Wieck wrote:
> Alex Pilosov wrote:
> > On Thu, 28 Jun 2001, Hannu Krosing wrote:
> > >
> > > How hard would it be to turn this around and implement RETURN AND
> > > CONTINUE
> > > for at least PL/PGSQL, and possibly C/Perl/Python ... ?
> > Cannot talk about plpgsql, but for c this would be probably implemented
> > with setjmp and with perl with goto. Probably not very complex.
>
> Don't think so. When the function returns, the call stack
> get's destroyed. Jumping back to there - er - the core dump
> is not even useful any more. Or did I miss something?
Well, it shouldn't return, but instead save the location and longjmp to
SPI_RESUME_jmp location. On a next call, instead of a function call, it
should longjmp back to saved location. I have to admit its more complex
than I originally thought, but probably doable.
-alex
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2001-06-28 06:33:24 | Re: Re: 7.2 items |
Previous Message | Jan Wieck | 2001-06-28 01:08:38 | Re: functions returning records |