Subject | Re: [Firebird-Architect] Re: Indexed Views |
---|---|
Author | Vlad Horsun |
Post date | 2004-12-22T14:24:23Z |
> > > EXECUTE BLOCK (a INTEGER, b VARCHAR(10)) RETURNS (id INTEGER) ASEXECUTE BLOCK with outputs semantically fully equal to
> > > BEGIN
> > > id = gen_id(my_generator, 1);
> > > INSERT INTO my_table (col_id, col_a, col_b) VALUES (:id, :a, :b)
> > SUSPEND;
> > !!! ;)
> oops...
> well, this gives some weight to a proposal to throw exception on
> SELECT from procedures without SUSPEND -- for I have made such mistake
> more than once.
SELECT * FROM stored procedure
...
> Then perhaps so should be said in the Firedird roadmap document, whichRoadmap is not a documentation replacement, right ? ;)
> now contains the following:
>
> >EXECUTE BLOCK syntax
> >Proposed Release: 2.0
> >Vlad Horsun and others are developing a syntax to allow DSQLIf you wish, you may read "doc\sql.extensions\README.execute_block"
> execution of an unnamed >block of procedural language code, consisting
> of a BEGIN...END block headed by an <EXECUTE BLOCK statement.
> >Syntax pattern:
>
> >EXECUTE BLOCK [ (param datatype = ?, param datatype = ?, ...) ]
> > [ RETURNS (param datatype, param datatype, ...) } AS
> > [DECLARE VARIABLE var datatype; ...]
> > BEGIN
> > ...
> > END
>
> Notice the 'param datatype = ?' parts.
which is available near the year :
http://cvs.sourceforge.net/viewcvs.py/firebird/firebird2/doc/sql.extensions/README.execute_block?view=markup
Since EXECUTE BLOCK is generated from client-side it's not needs
to have default parameters
Regards,
Vlad