summaryrefslogtreecommitdiff
path: root/src/pl/plpython
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-22 00:01:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-22 00:01:51 +0000
commitb663f3443ba096a06970214c3e83e79f6e570b84 (patch)
tree049e26c1b02535c12bee6e60ba89cf1d42a41a72 /src/pl/plpython
parent606c9b9d4fafe9300d039c044edc9727c0ed43c9 (diff)
Add a bunch of pseudo-types to replace the behavior formerly associated
with OPAQUE, as per recent pghackers discussion. I still want to do some more work on the 'cstring' pseudo-type, but I'm going to commit the bulk of the changes now before the tree starts shifting under me ...
Diffstat (limited to 'src/pl/plpython')
-rw-r--r--src/pl/plpython/plpython.c4
-rw-r--r--src/pl/plpython/plpython_function.sql6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 6d26cc75ddb..986937e5e0a 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -29,7 +29,7 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.19 2002/07/20 05:16:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.20 2002/08/22 00:01:50 tgl Exp $
*
*********************************************************************
*/
@@ -447,7 +447,7 @@ plpython_call_handler(PG_FUNCTION_ARGS)
* this action. MODIFY means the tuple has been modified, so update
* tuple and perform action. SKIP and MODIFY assume the trigger fires
* BEFORE the event and is ROW level. postgres expects the function
- * to take no arguments and return an argument of type opaque.
+ * to take no arguments and return an argument of type trigger.
*/
HeapTuple
PLy_trigger_handler(FunctionCallInfo fcinfo, PLyProcedure * proc)
diff --git a/src/pl/plpython/plpython_function.sql b/src/pl/plpython/plpython_function.sql
index 46083ab2ba2..46ab4babd35 100644
--- a/src/pl/plpython/plpython_function.sql
+++ b/src/pl/plpython/plpython_function.sql
@@ -92,7 +92,7 @@ return words'
-- vigorously resisted all efforts at correction. they have
-- since gone bankrupt...
-CREATE FUNCTION users_insert() returns opaque
+CREATE FUNCTION users_insert() returns trigger
AS
'if TD["new"]["fname"] == None or TD["new"]["lname"] == None:
return "SKIP"
@@ -108,7 +108,7 @@ return rv'
LANGUAGE 'plpython';
-CREATE FUNCTION users_update() returns opaque
+CREATE FUNCTION users_update() returns trigger
AS
'if TD["event"] == "UPDATE":
if TD["old"]["fname"] != TD["new"]["fname"] and TD["old"]["fname"] == TD["args"][0]:
@@ -117,7 +117,7 @@ return None'
LANGUAGE 'plpython';
-CREATE FUNCTION users_delete() RETURNS opaque
+CREATE FUNCTION users_delete() RETURNS trigger
AS
'if TD["old"]["fname"] == TD["args"][0]:
return "SKIP"