Subject Re: [firebird-support] Storing comments in trigger and stored procedure source
Author Lucas Franzen
Bob,

Bob Murdoch schrieb:
> I'm assuming this is a limitation of the tools I use, but I am unable
> to run a script for creating a trigger or stored procedure and have
> the comments saved as part of the source. For example:
>
> connect "db:db";
>
> set term ^
>
> create procedure Test
> returns (a integer)
> begin
> /* This is a very important comment documenting the logic of this
> SP */
> a = 1;
> end^
> commit^

this shouldn't work, since you do set the new termination symbol but you
don't terminate this statement!
Syntax is:

set term <NEW_SYMBOL> <STANDARD SYMBOL>
i.e.

set term ^;

create procedure Test
returns (a integer)

/* add comments inside the proc and they are part of the source */

-- you can also add one line comments like this.

...

end^

SET TERM ;^ <-- set termination symbol back to the semicolon!

commit; <-- ";" is termination symbol again, so use it.


Luc.