Re: [PATCHES] SPI-header-files safe for C++-compiler

2007-07-04 Thread Jacob Rief
Tom Lane writes: > It makes sense for libpq to be able to execute within a C++ application. > As was already debated, it's not nearly as clear that it makes sense to > try to use C++ for backend modules. That correct. But I have to define some types using external libraries. > In any case, you ar

Re: [PATCHES] SPI-header-files safe for C++-compiler

2007-07-03 Thread Jacob Rief
Tom Lane writes: > That will have exactly zero effect. As was shown upthread, even > everyday C++ programmers don't remember what all the extra keywords are. > Guys who mainly code C are very unlikely to get this right if there's no > automatic check being applied. Just for curiosity, I would li

Re: [PATCHES] SPI-header-files safe for C++-compiler

2007-07-02 Thread Jacob Rief
> Tom Lane writes: > The problem that I see after trying the experiment, however, is that > actually building Postgres using a C++ compiler would require changes > enormously more invasive than just renaming some fields and function > argument names. And I have no confidence in our ability to *ke

Re: [PATCHES] SPI-header-files safe for C++-compiler

2007-06-29 Thread Jacob Rief
On Thu, 2007-28-06 at 01:15 -0400, Tom Lane wrote: > Sure, but we don't break them just on a whim. The bottom line here is > whether we are going to make a real commitment to making C++ usable as > a backend extension language --- and for the reasons I mentioned, that > would entail a lot more tha

Re: [PATCHES] SPI-header-files safe for C++-compiler

2007-06-28 Thread Jacob Rief
Tom Lane wrote: > Sure, but we don't break them just on a whim. The bottom line here is > whether we are going to make a real commitment to making C++ usable as > a backend extension language --- and for the reasons I mentioned, that > would entail a lot more than renaming a few identifiers. It w

[PATCHES] SPI-header-files safe for C++-compiler

2007-06-27 Thread Jacob Rief
This is a request I posted in February. The thread was named "Writing triggers in C++". However I did not supply a patch then, and some people misunderstood my problem. I will try to explain it again: My problem is, I wrote some triggers in C using the SPI-API. Those triggers call some functions d

[PATCHES] SPI_psprintf and SPI_pstrdup

2007-04-24 Thread Jacob Rief
*src); allocates a block of memory out of the memory pool and copies an existing string into it. I includes a patch containing these functions to be applied onto version 8.2.3 and 8.2.4. I would appreciate seeing it in one of the next versions. Jacob Rief diff -ur postgresql-8.2.3/src/backend/exe