Issue Details (XML | Word | Printable)

Key: CORE-886
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Michael Trowe
Votes: 4
Watchers: 2

If you were logged in you would be able to see more operations.
Firebird Core

SPs in views

Created: 03/Aug/06 09:40 AM   Updated: 19/Jan/16 05:38 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.5 Alpha 1

Issue Links:

Target: 2.5.0
QA Status: Done successfully

 Description  « Hide
If I want to run a query from a SP with limiting the result-set or with joining other tables, I have to run the query by client or in another SP. But I can' create a view using the SP:


create view MY_VIEW ( "FIELD_1" )
  from MY_PROCEDURE('...')

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Valdir Stiebe Junior added a comment - 08/Oct/06 05:11 AM
Yes! Enabling us to create a "stored procedure based editable view" will be nice for reducing the ammount of code in client application.
I will use it for translating updates in deletes or inserts in some cases.

Philip Williams added a comment - 19/Feb/08 11:21 AM
This issue's (886) priority may be "minor" ... but to me the potential coolness factor is "major". Thanks!

Does the existing patch for 2.5 include the ability to do:

SELECT ... FROM a ... join ... EXECUTE BLOCK RETURNS (x ..., y ...) AS BEGIN ... END z ON ...

and create a VIEW from it? Seems like if we can create a view based on a stored procedure that returns rows, basing a view on an anonymous block that does the same would be logically (if not physically, I'm not saying it'd be easy!) similar ... just curious.

Dmitry Yemanov added a comment - 19/Feb/08 11:48 AM
No, there are no plans to support EXECUTE BLOCK inside select expressions.