mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-11 07:37:39 +08:00
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 ...
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user