allow users to define set-returning functions
that do not have this limitation. Currently, the point at
which data begins being written to disk is controlled by the
- work_mem> configuration variable. Administrators
- who have sufficient memory to store larger result sets in
- memory should consider increasing this parameter.
+
+ configuration variable. Administrators who have sufficient
+ memory to store larger result sets in memory should consider
+ increasing this parameter.
- The condition names can be any of those
- shown in . A category name matches
- any error within its category.
- The special condition name OTHERS>
- matches every error type except QUERY_CANCELED>.
- (It is possible, but often unwise, to trap
- QUERY_CANCELED> by name.)
- Condition names are not case-sensitive.
+ The condition names can be any of
+ those shown in . A category
+ name matches any error within its category. The special
+ condition name OTHERS> matches every error type except
+ QUERY_CANCELED>. (It is possible, but often unwise,
+ to trap QUERY_CANCELED> by name.) Condition names are
+ not case-sensitive.
-
Exceptions with UPDATE/INSERT
+
Exceptions with UPDATE>/INSERT>
- This example uses an EXCEPTION> to UPDATE> or
- INSERT>, as appropriate.
+
+ This example uses exception handling to perform either
+ UPDATE> or INSERT>, as appropriate.
CREATE TABLE db (a INT PRIMARY KEY, b TEXT);
-CREATE FUNCTION merge_db (key INT, data TEXT) RETURNS VOID AS
+CREATE FUNCTION merge_db(key INT, data TEXT) RETURNS VOID AS
$$
BEGIN
LOOP
$$
LANGUAGE plpgsql;
-SELECT merge_db (1, 'david');
-SELECT merge_db (1, 'dennis');
+SELECT merge_db(1, 'david');
+SELECT merge_db(1, 'dennis');