Open jwp opened 14 years ago
Postgres.Call needs to have some intelligence in order to distinguish between SRFs and regular functions; this also has some impact on the supported interfaces:
SRFs will only support next Non-SRFs will support call()
VPC-SRFs will likely be the supported mode, and each call will need it's own MemoryContext.
Also, consider an optimization for SRFs that return a Call() like Postgres.Cursor() returns.
Currently, direct function calls cannot leverage SRFs or functions that keep state.
An explicit Call object to manage that state is necessary. This is, essentially, objectified fcinfo.