fbout-header.sql 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * The contents of this file are subject to the Initial
  3. * Developer's Public License Version 1.0 (the "License");
  4. * you may not use this file except in compliance with the
  5. * License. You may obtain a copy of the License at
  6. * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
  7. *
  8. * Software distributed under the License is distributed AS IS,
  9. * WITHOUT WARRANTY OF ANY KIND, either express or implied.
  10. * See the License for the specific language governing rights
  11. * and limitations under the License.
  12. *
  13. * The Original Code was created by Adriano dos Santos Fernandes
  14. * for the Firebird Open Source RDBMS project.
  15. *
  16. * Copyright (c) 2009 Adriano dos Santos Fernandes <[email protected]>
  17. * and all contributors signed below.
  18. *
  19. * All Rights Reserved.
  20. * Contributor(s): ______________________________________.
  21. */
  22. create sequence fb$out_seq;
  23. create domain fb$out_type as blob sub_type text character set utf8 not null;
  24. create global temporary table fb$out_table (
  25. line_num int,
  26. content fb$out_type
  27. ) on commit preserve rows;
  28. set term !;
  29. create or alter package fb$out
  30. as
  31. begin
  32. procedure enable;
  33. procedure disable;
  34. procedure put_line (line fb$out_type);
  35. procedure clear;
  36. procedure get_lines returns (lines fb$out_type);
  37. end!
  38. set term ;!
  39. grant all on table fb$out_table to package fb$out;
  40. grant execute on package fb$out to public;