I am using PostgreSQL's Server Programming Interface (SPI) to build my postgres extension and execute my query. Please see this detailed example, or the following simple code sample:
int ret = SPI_exec("SELECT * FROM ....", 0);
We know that PostgreSQL has parallel query support feature, where a query is executed in parallel using multiple processors. Since the SPI interface hides quite some complexity (communication/locks/cursors/etc), I was wondering whether executing a query in this way limits this parallel query feature in some way or not? Obviously, if it does indeed pose a limit, then maybe it is not worth making use of.