postgresql function declare
Parameters passed to functions are named with the identifiers $1 , $2 , etc. Optionally, aliases can be declared for $ n parameter names for increased readability. ,When a PL/pgSQL function is declared with output parameters, the output parameters are given $n names and optional aliases in just the same way as the normal input parameters. An output parameter is effectively a variable that starts out NULL; it should b,The name of an output column in the RETURNS TABLE syntax. This is effectively another way of declaring a named OUT parameter, except that RETURNS TABLE ... ,When a PL/pgSQL function is declared with output parameters, the output parameters are given $n names and optional aliases in just the same way as the normal input parameters. An output parameter is effectively a variable that starts out NULL; it should b,CREATE FUNCTION sales_tax(real) RETURNS real AS $$ DECLARE subtotal ALIAS FOR $1; BEGIN RETURN subtotal * 0.06; END; $$ LANGUAGE plpgsql;. ,CREATE FUNCTION sales_tax(real) RETURNS real AS $$ DECLARE subtotal ALIAS FOR $1; BEGIN RETURN subtotal * 0.06; END; $$ LANGUAGE plpgsql;. ,The name of an output column in the RETURNS TABLE syntax. This is effectively another way of declaring a named OUT parameter, except that RETURNS TABLE ... ,Postgresql historically doesn't support procedural code at the command level - only within functions. However, in Postgresql 9, support has been added to ... ,A variable holds a value that can be changed through the block or function. A variable is always associated with a particular data type. Before using a variable, you must declare it in the declaration section of the PL/pgSQL block. The following illustrat,CREATE [OR REPLACE] FUNCTION function_name (arguments) RETURNS return_datatype AS $variable_name$ DECLARE declaration; [...] BEGIN < ...
相關軟體 PostgreSQL 資訊 | |
---|---|
PostgreSQL 是一個跨平台的對象關係型數據庫管理系統,自 1995 年首次發布以來,已經成長為國際知名的解決方案,可幫助管理員輕鬆創建,組織,管理和部署各種形狀和大小的項目數據庫。這當然包括對運行 SQL 查詢,觸發管理,屬性管理以及其他企業級數據庫管理系統當前正在使用的所有功能的全面控制。為使日常管理多個作業和項目組件的管理員更容易訪問,PostgreSQL 符合大多數 SQL 2008... PostgreSQL 軟體介紹
postgresql function declare 相關參考資料
Documentation: 11: 43.3. Declarations - PostgreSQL
Parameters passed to functions are named with the identifiers $1 , $2 , etc. Optionally, aliases can be declared for $ n parameter names for increased readability. https://www.postgresql.org Documentation: 9.0: Declarations - PostgreSQL
When a PL/pgSQL function is declared with output parameters, the output parameters are given $n names and optional aliases in just the same way as the normal input parameters. An output parameter is e... https://www.postgresql.org Documentation: 9.1: CREATE FUNCTION - PostgreSQL
The name of an output column in the RETURNS TABLE syntax. This is effectively another way of declaring a named OUT parameter, except that RETURNS TABLE ... https://www.postgresql.org Documentation: 9.1: Declarations - PostgreSQL
When a PL/pgSQL function is declared with output parameters, the output parameters are given $n names and optional aliases in just the same way as the normal input parameters. An output parameter is e... https://www.postgresql.org Documentation: 9.3: Declarations - PostgreSQL
CREATE FUNCTION sales_tax(real) RETURNS real AS $$ DECLARE subtotal ALIAS FOR $1; BEGIN RETURN subtotal * 0.06; END; $$ LANGUAGE plpgsql;. https://www.postgresql.org Documentation: 9.4: Declarations - PostgreSQL
CREATE FUNCTION sales_tax(real) RETURNS real AS $$ DECLARE subtotal ALIAS FOR $1; BEGIN RETURN subtotal * 0.06; END; $$ LANGUAGE plpgsql;. https://www.postgresql.org Documentation: 9.5: CREATE FUNCTION - PostgreSQL
The name of an output column in the RETURNS TABLE syntax. This is effectively another way of declaring a named OUT parameter, except that RETURNS TABLE ... https://www.postgresql.org How to declare local variables in postgresql? - Stack Overflow
Postgresql historically doesn't support procedural code at the command level - only within functions. However, in Postgresql 9, support has been added to ... https://stackoverflow.com PLpgSQL Variables - PostgreSQL Tutorial
A variable holds a value that can be changed through the block or function. A variable is always associated with a particular data type. Before using a variable, you must declare it in the declaration... https://www.postgresqltutorial PostgreSQL函數- PostgreSQL基礎教程 - 極客書
CREATE [OR REPLACE] FUNCTION function_name (arguments) RETURNS return_datatype AS $variable_name$ DECLARE declaration; [...] BEGIN < ... http://tw.gitbook.net |