From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, dandl <david(at)andl(dot)org>, Adam Brusselback <adambrusselback(at)gmail(dot)com>, Joy Arulraj <jarulraj(at)cs(dot)cmu(dot)edu>, kang joni <kangjoni76(at)gmail(dot)com>, Dmitry Igrishin <dmitigr(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net> |
Subject: | Re: [GENERAL] C++ port of Postgres |
Date: | 2016-08-16 20:40:06 |
Message-ID: | CAM3SWZRf9u8CbyOZY4W2iS3Xj_bafMHYraetSbc=W79NQKn_DA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Tue, Aug 16, 2016 at 1:29 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> IMV, it would be useful to use C++ classes (and even template classes)
> for a small number of data structures, while still largely adhering to
> earlier practices (this is what GCC did). Specifically, a few modules
> such as StringInfo, could be made to follow the RAII/scope bound
> resource management usefully, which doesn't seem incompatible with
> memory contexts. However, this doesn't seem terribly exciting to me.
Actually, come to think of it, I guess this is wrong. The problem with
what I say here is that longjmp() and setjmp() are incompatible with
the stack unwinding used by C++ destructors in general (exceptions are
another issue). I think that the practical implication of that is that
we can never use any C++ feature that hides the complexity of resource
management, unless and until elog() is reimplemented to not use
longjmp() and setjmp().
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-08-16 20:48:00 | Re: [GENERAL] C++ port of Postgres |
Previous Message | Andres Freund | 2016-08-16 20:38:31 | Re: [GENERAL] C++ port of Postgres |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-08-16 20:48:00 | Re: [GENERAL] C++ port of Postgres |
Previous Message | Andres Freund | 2016-08-16 20:38:31 | Re: [GENERAL] C++ port of Postgres |