DEV Community

Jawad Ali Abbasi
Jawad Ali Abbasi

Posted on

Apache AGE | RTE & PNSI

Sup!

Welcome back to another one in the series for Apache AGE. In this blog, we will discuss about two structs that are being used in PostgreSQL for the same purpose RTE & PNSI.

RTE, Range Table Entry, is a kind of temporary table that SQL queries or statements operate on. Not necessarily a table, RT also refers to other things like subqueries or any other record sets. It is a structure defined in PostgreSQL and is used in the parsing stage to hold data.

PNSI,Parse Name Space Item, is another struct defined in parse_node.h file. It has replaced RTE in PostgreSQL 13. Although it is a different structure, PNSI contains a field for RTE.

Apache AGE supports older versions of PostgreSQL and is being developed and updated for newer versions. Older versions of PostgreSQL use RTE which has been replaced by PNSI, another approach to do the same task in newer versions. Now, AGE still uses RTE which may become redundant over time.

But, after thorough research on the topic and source code of AGE, we were able to conclude that replacing RTE with PNSI would create problems that it would solve. Hence, we will continue on with RTE.

So that's all for this one. A discussion about a possible change in Apache AGE which was discontinued.

https://age.apache.org/
https://github.com/apache/age

Stay Tuned For More!

Top comments (0)