Re: [HACKERS] palloc unification

2013-02-12 Thread Alvaro Herrera
Alvaro Herrera escribió: Alvaro Herrera escribió: c. I added the MSVC bits. I tested that most of it works, but the various regress executables as well as zic failed to build due to lack of libpgcommon at link time. I think I fixed it; I'm waiting on new tests to run. (This

Re: [HACKERS] palloc unification

2013-02-11 Thread Alvaro Herrera
Here's a more finalized version of this. There are two main interesting changes here: 1. postgres_fe.h includes common/fe_memutils.h This means all frontend programs get the #include without having to do it explicitely by themselves. postgres.h includes utils/palloc.h which I used as

Re: [HACKERS] palloc unification

2013-02-11 Thread Alvaro Herrera
Alvaro Herrera escribió: c. I added the MSVC bits. I tested that most of it works, but the various regress executables as well as zic failed to build due to lack of libpgcommon at link time. I think I fixed it; I'm waiting on new tests to run. (This patch is the fixed version).

Re: [HACKERS] palloc unification

2013-02-06 Thread Robert Haas
On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: There was some discussion about unifying backend and frontend code/headers for palloc et al, particularly so that programs that want to mix both can be easily compiled; see

Re: [HACKERS] palloc unification

2013-02-06 Thread Alvaro Herrera
Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory src/include/shared, and two header files: The frontend (pg_malloc) function definitions would live somewhere in, say, src/shared/fe_memutils.c.

Re: [HACKERS] palloc unification

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 9:38 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory src/include/shared, and two header files: The frontend (pg_malloc)

Re: [HACKERS] palloc unification

2013-02-06 Thread Simon Riggs
On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory src/include/shared, and two header files: The frontend (pg_malloc) function

Re: [HACKERS] palloc unification

2013-02-06 Thread Phil Sorber
On Wed, Feb 6, 2013 at 9:59 AM, Simon Riggs si...@2ndquadrant.com wrote: On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory

Re: [HACKERS] palloc unification

2013-02-06 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Yeah, I am doing this right now and the shared name doesn't seem so good. libpgframework sounds decent. So since libpgport comes from src/port, are we okay with src/framework

Re: [HACKERS] palloc unification

2013-02-06 Thread Alvaro Herrera
Tom Lane escribió: Simon Riggs si...@2ndquadrant.com writes: On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Yeah, I am doing this right now and the shared name doesn't seem so good. libpgframework sounds decent. So since libpgport comes from src/port, are we

Re: [HACKERS] palloc unification

2013-02-06 Thread Andres Freund
On 2013-02-06 15:51:15 -0300, Alvaro Herrera wrote: Okay, here's an attempt at doing it that way. Notably this creates libpgcommon, a static library, to be used by both frontend and backend. There's only a frontend file now (fe_memutils.c); the backend side of it is empty. I verified that

[HACKERS] palloc unification

2013-02-04 Thread Alvaro Herrera
There was some discussion about unifying backend and frontend code/headers for palloc et al, particularly so that programs that want to mix both can be easily compiled; see http://www.postgresql.org/message-id/20130118150629.gc29...@alap2.anarazel.de for what I believe to be the latest and