* SPI_cursor_find() * * Find the portal of an existing open cursor */
| 1834 | * Find the portal of an existing open cursor |
| 1835 | */ |
| 1836 | Portal |
| 1837 | SPI_cursor_find(const char *name) |
| 1838 | { |
| 1839 | Portal portal = GetPortalByName(name); |
| 1840 | |
| 1841 | if (portal != NULL && PortalIsParallelRetrieveCursor(portal)) |
| 1842 | { |
| 1843 | ereport(ERROR, |
| 1844 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), |
| 1845 | errmsg("The PARALLEL RETRIEVE CURSOR is not supported in SPI."), |
| 1846 | errhint("Use normal cursor statement instead."))); |
| 1847 | } |
| 1848 | |
| 1849 | return portal; |
| 1850 | } |
| 1851 | |
| 1852 | |
| 1853 | /* |
no test coverage detected