Re: C exception code

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Giles Lean <giles(at)nemeton(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: C exception code
Date: 2000-06-26 21:34:48
Message-ID: 200006262134.RAA01035@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oh, well. At least I asked. :-)

>
> > Are we interested in adding Try/Catch exception code to PostgreSQL.
> > This looks interesting:
> >
> > http://www.cs.berkeley.edu/~amc/cexcept/
>
> IMHO using the C pre-processor to make C look like some other language:
>
> - makes the code harder to read as readers have to learn the dialect
> first
>
> - makes the code harder to debug, since debugging tools don't know the
> dialect but only the C it is translated into
>
> This exception implementation has the obvious(?) problem of using
> setjump()/longjmp() where sigsetjmp()/siglongjmp() would probably be
> necessary for postgresql.
>
> There are places too where this implementation would just plain not
> work and so couldn't be used: setjmp(), longjmp(), sigsetjump(), and
> siglongjmp() are not async safe signal functions and so can't be
> called in signal handlers, for a start.
>
> Regards,
>
> Giles
>
>
>
>

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Giles Lean 2000-06-26 21:36:53 Re: C exception code
Previous Message Giles Lean 2000-06-26 21:00:41 Re: Proposal: More flexible backup/restore via pg_dump