I am learning postgresql source code
But I am curious about why situations is not written in c++.
Is it a history reason(just choose a c language)
Or maybe in some situations c has better performance than c++.
The world’s most popular databases, including PostgreSQL, MySQL, Oracle Database are coded in C
PostgreSQL has a long history. It was conceived as a successor to Ingres, which goes back to the 1970s. Although the first version of PostgreSQL was released to the public in 1996, papers about it were published as early as 1986, only a year after Stroustrup published The C++ Programming Language and the first C++ compiler became available.
So at the time the early versions of PostgreSQL were developed, C++ didn't properly exist yet.