Обсуждение: C++ port of Postgres
We have ported Postgres over to the C++ language (C++11 standard).
https://github.com/jarulraj/postgresql-cpp
Our goal is to use certain features of the C++ language and its standard library to simplify coding, improve code reuse, and avoid bugs. Peter's article titled `Moving to C++` was a source of inspiration for us.
We have ported Postgres over to the C++ language (C++11 standard).
https://github.com/jarulraj/postgresql-cpp
Our goal is to use certain features of the C++ language and its standard library to simplify coding, improve code reuse, and avoid bugs. Peter's article titled `Moving to C++` was a source of inspiration for us.
does this compile with the non-GCC compilers that postgres gets built with, for instance, IBM XLC++ on AIX, Oracle Studio C++ on Solaris, Microsoft Visual C++ on MS Windows, CLang on BSD ? what about popular platforms like RHEL 6, where gcc is 4.4.7 ?
-- john r pierce, recycling bits in santa cruz
Hi Joy, 2016-08-15 0:05 GMT+03:00 Joy Arulraj <jarulraj@cs.cmu.edu>: > Hi folks -- > > We have ported Postgres over to the C++ language (C++11 standard). > > https://github.com/jarulraj/postgresql-cpp > > Our goal is to use certain features of the C++ language and its standard > library to simplify coding, improve code reuse, and avoid bugs. Peter's > article titled `Moving to C++` was a source of inspiration for us. What about the exceptions? Are you using them? -- // Dmitry.
Hi Dmitry -- We currently don't use exceptions, but we can certainly use them in the port. We can also use STL and smart pointers to simplify development and minimize memory bugs.
Hi Joy,
2016-08-15 0:05 GMT+03:00 Joy Arulraj <jarulraj@cs.cmu.edu>:
> Hi folks --
>
> We have ported Postgres over to the C++ language (C++11 standard).
>
> https://github.com/jarulraj/postgresql-cpp
>
> Our goal is to use certain features of the C++ language and its standard
> library to simplify coding, improve code reuse, and avoid bugs. Peter's
> article titled `Moving to C++` was a source of inspiration for us.
What about the exceptions? Are you using them?
--
// Dmitry.
I agree with this project, I dont like any setjmp/longjmp and the like. It just fighting against the nature of c++ language. Building either from scratch gcc48 or clang381 were easy nowdays on either old linux debian squeeze or centos 5. PS: I had this requirement circumtances. On 8/15/16, Joy Arulraj <jarulraj@cs.cmu.edu> wrote: > Hi Dmitry -- We currently don't use exceptions, but we can certainly use > them in the port. We can also use STL and smart pointers to simplify > development and minimize memory bugs. > > On Aug 14, 2016 5:41 PM, "Dmitry Igrishin" <dmitigr@gmail.com> wrote: > >> Hi Joy, >> >> 2016-08-15 0:05 GMT+03:00 Joy Arulraj <jarulraj@cs.cmu.edu>: >> > Hi folks -- >> > >> > We have ported Postgres over to the C++ language (C++11 standard). >> > >> > https://github.com/jarulraj/postgresql-cpp >> > >> > Our goal is to use certain features of the C++ language and its >> > standard >> > library to simplify coding, improve code reuse, and avoid bugs. Peter's >> > article titled `Moving to C++` was a source of inspiration for us. >> What about the exceptions? Are you using them? >> >> -- >> // Dmitry. >> >
I agree with this project, I dont like any setjmp/longjmp and the
like. It just fighting against the nature of c++ language. Building
either from scratch gcc48 or clang381 were easy nowdays on either old
linux debian squeeze or centos 5. PS: I had this requirement
circumtances.
On 8/15/16, Joy Arulraj <jarulraj@cs.cmu.edu> wrote:
> Hi Dmitry -- We currently don't use exceptions, but we can certainly use
> them in the port. We can also use STL and smart pointers to simplify
> development and minimize memory bugs.
>
> On Aug 14, 2016 5:41 PM, "Dmitry Igrishin" <dmitigr@gmail.com> wrote:
>
>> Hi Joy,
>>
>> 2016-08-15 0:05 GMT+03:00 Joy Arulraj <jarulraj@cs.cmu.edu>:
>> > Hi folks --
>> >
>> > We have ported Postgres over to the C++ language (C++11 standard).
>> >
>> > https://github.com/jarulraj/postgresql-cpp
>> >
>> > Our goal is to use certain features of the C++ language and its
>> > standard
>> > library to simplify coding, improve code reuse, and avoid bugs. Peter's
>> > article titled `Moving to C++` was a source of inspiration for us.
>> What about the exceptions? Are you using them?
>>
>> --
>> // Dmitry.
>>
>
Just wondering what the end goal is for this project... Is it to just maintain an up to date Postgres fork that will compile with a C++ compiler? Is it to get a conversation going for a direction for Postgres itself to move? The former I don't see gaining much traction or doing all that much for the state of the project. The latter possibly could if the community gets on board.
I would certainly hope the latter. Having done some work on extension functions and an extension language for Postgres, the current situation can be quite limiting.
· Parts of my code could only be written in C++, so I finished up with a mixed build, which is not ideal.
· My other issue was dealing with the Datum macros. Type-safe inline C++ functions would help reduce dumb errors.
Not compelling reasons perhaps, but just a vote for a move in that direction, some time.
Regards
David M Bennett FACS
Andl - A New Database Language - andl.org
On 16/08/16 18:24, dandl wrote: > > Just wondering what the end goal is for this project... Is it to just > maintain an up to date Postgres fork that will compile with a C++ > compiler? Is it to get a conversation going for a direction for > Postgres itself to move? The former I don't see gaining much traction > or doing all that much for the state of the project. The latter > possibly could if the community gets on board. > > I would certainly hope the latter. Having done some work on extension > functions and an extension language for Postgres, the current > situation can be quite limiting. > > ·Parts of my code could only be written in C++, so I finished up with > a mixed build, which is not ideal. > > ·My other issue was dealing with the Datum macros. Type-safe inline > C++ functions would help reduce dumb errors. > > Not compelling reasons perhaps, but just a vote for a move in that > direction, some time. > > Regards > > David M Bennett FACS > > / > ------------------------------------------------------------------------ > / > > /Andl - A New Database Language - andl.org/ > I note that gcc itself is now written in C++, and so is squid (web proxy)... In both cases, part of the motivation to change from C was to appeal to new developers - from what I remember of the discussions. Cheers, Gavin
Well done. This is a much needed conversion. As Peter’s article says, it does open up more opportunities.
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Joy Arulraj
Sent: 14 August 2016 22:06
To: pgsql-general@postgresql.org
Subject: [GENERAL] C++ port of Postgres
Hi folks --
We have ported Postgres over to the C++ language (C++11 standard).
https://github.com/jarulraj/postgresql-cpp
Our goal is to use certain features of the C++ language and its standard library to simplify coding, improve code reuse, and avoid bugs. Peter's article titled `Moving to C++` was a source of inspiration for us.
Regards.
On 16/08/16 18:24, dandl wrote:
Just wondering what the end goal is for this project... Is it to just maintain an up to date Postgres fork that will compile with a C++ compiler? Is it to get a conversation going for a direction for Postgres itself to move? The former I don't see gaining much traction or doing all that much for the state of the project. The latter possibly could if the community gets on board.
I would certainly hope the latter. Having done some work on extension functions and an extension language for Postgres, the current situation can be quite limiting.
·Parts of my code could only be written in C++, so I finished up with a mixed build, which is not ideal.
·My other issue was dealing with the Datum macros. Type-safe inline C++ functions would help reduce dumb errors.
Not compelling reasons perhaps, but just a vote for a move in that direction, some time.
RegardsI note that gcc itself is now written in C++, and so is squid (web proxy)...
David M Bennett FACS
/
------------------------------------------------------------ ------------
/
/Andl - A New Database Language - andl.org/
In both cases, part of the motivation to change from C was to appeal to new developers - from what I remember of the discussions.
Cheers,
Gavin
Well done. This is a much needed conversion. As Peter’s article says, it does open up more opportunities.
From: pgsql-general-owner@
postgresql.org [mailto:pgsql-general-owner@ postgresql.org] On Behalf Of Joy Arulraj
Sent: 14 August 2016 22:06
To: pgsql-general@postgresql.org
Subject: [GENERAL] C++ port of Postgres
Hi folks --
We have ported Postgres over to the C++ language (C++11 standard).
https://github.com/jarulraj/postgresql-cpp
Our goal is to use certain features of the C++ language and its standard library to simplify coding, improve code reuse, and avoid bugs. Peter's article titled `Moving to C++` was a source of inspiration for us.Regards.
On 8/16/16 2:52 AM, Gavin Flower wrote: > In both cases, part of the motivation to change from C was to appeal to > new developers - from what I remember of the discussions. I have moved this discussion over to -hackers. (https://www.postgresql.org/message-id/f7682c24-4271-1ff5-d963-053ecb0fce40@BlueTreble.com) -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com 855-TREBLE2 (855-873-2532) mobile: 512-569-9461
On Sun, Aug 14, 2016 at 5:05 PM, Joy Arulraj <jarulraj@cs.cmu.edu> wrote: > Hi folks -- > > We have ported Postgres over to the C++ language (C++11 standard). > > https://github.com/jarulraj/postgresql-cpp > > Our goal is to use certain features of the C++ language and its standard > library to simplify coding, improve code reuse, and avoid bugs. Peter's > article titled `Moving to C++` was a source of inspiration for us. Do you remember the particular commit of PG upon which you based this work? Or even better, are you able to post a patch which applies cleanly to PG's current HEAD? I ask because I'd like to compare your approach to the one Peter has posted, and I think that will be easier if I can use a common (or at least similar) baseline for the comparison. Kind regards, Christian
On Sun, Aug 14, 2016 at 5:05 PM, Joy Arulraj <jarulraj@cs.cmu.edu> wrote:
> Hi folks --
>
> We have ported Postgres over to the C++ language (C++11 standard).
>
> https://github.com/jarulraj/postgresql-cpp
>
> Our goal is to use certain features of the C++ language and its standard
> library to simplify coding, improve code reuse, and avoid bugs. Peter's
> article titled `Moving to C++` was a source of inspiration for us.
Do you remember the particular commit of PG upon which you based this
work? Or even better, are you able to post a patch which applies
cleanly to PG's current HEAD?
I ask because I'd like to compare your approach to the one Peter has
posted, and I think that will be easier if I can use a common (or at
least similar) baseline for the comparison.
Kind regards,
Christian