summaryrefslogtreecommitdiff
path: root/src/bin/pgaccess/lib/help/functions.hlp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pgaccess/lib/help/functions.hlp')
-rw-r--r--src/bin/pgaccess/lib/help/functions.hlp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/bin/pgaccess/lib/help/functions.hlp b/src/bin/pgaccess/lib/help/functions.hlp
new file mode 100644
index 00000000000..2bb4318f7c7
--- /dev/null
+++ b/src/bin/pgaccess/lib/help/functions.hlp
@@ -0,0 +1,32 @@
+.pgaw:Help.f.t insert end "Functions" {title} "
+
+ The Functions tab is used to inspect the user defined functions in the\
+database, to define new functions and to alter the existing ones.
+
+ Press the \"New\" button to define a new function. You should enter the\
+function name, the function parameters (if any) separated by comma. \
+If function returns a value, you should specify the " {} \
+"PostgreSQL data type" {link data_types} " that function will return.
+
+ You must also specify the language that will be used to parse the defined\
+function. You could specify SQL, plpgsql, pgtcl or C. Then you should enter the\
+function body. Press \"Save\" button in order to save it
+
+" {} "Example:" {italic} "
+ We have a table called \"products\" that is indexed on \"id\" (int4) field and\
+contains the float8 field \"price\". We will define a new function \"get_product_price\"\
+that will return the product price for a given id.
+
+ You should enter " {} "get_product_price" {code} " as the function name, " {} \
+"int4" {code} " in parameters entry, " {} "float8" {code} " for returns, " {} \
+"SQL" {code} " for the language. Then go to the function body definition and type:" {} "
+
+SELECT price FROM products where id = \$1" {code} "
+
+ To delete a function, select it from the list box and use the menu command\
+Object/Delete.
+
+ For more information see SQL commands " {} "CREATE FUNCTION" {link create_function} " and " {} \
+"DROP FUNCTION" {link drop_function}
+
+