The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Stored Procedure return unwanted cursor result Ask Question. Asked 3 years, 4 months ago. Active 3 years, 4 months ago. Viewed times. Context I have created a stored procedure that simulates a merge command for an OLTP in-memory table. Question I understand that this is normal behavior, but I try to suppress this to get a simpler result.
Improve this question. Community Bot 1. Steffen Mangold Steffen Mangold 4 4 silver badges 15 15 bronze badges.
As you may have noticed, the name of the cursor may change, and it is quite inconvenient to fetch the cursor name first, and then use it in the FETCH statement. As an option you can slightly redesign a procedure and pass the cursor name as a parameter, so the caller always knows which cursor to fetch:.
If you call a procedure that returns multiple result sets in PSQL tool, pgAdmin Query tool or another function, the query returns cursor names:. You can also redesign the function, and pass all cursor names as parameters to get predefined cursor names:. You can call a PostgreSQL stored procedure and process a result set in a. NET application, for example, in C application using Npgsql. NET data provider. Email Required, but never shown. The Overflow Blog. Podcast Explaining the semiconductor shortage, and how it might end.
Does ES6 make JavaScript frameworks obsolete? Featured on Meta. Now live: A fully responsive profile. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.
0コメント