cxgn_breedbase
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
store_featureprop_pub(integer, integer)
Parameters
Name
Type
Mode
integer
IN
integer
IN
Definition
DECLARE pfeatureprop_id ALIAS FOR $1; ppub_id ALIAS FOR $2; pkeyid INTEGER; BEGIN SELECT INTO pkeyid 0 FROM featureprop_pub WHERE featureprop_pub.featureprop_id = pfeatureprop_id AND featureprop_pub.pub_id = ppub_id; IF NOT FOUND THEN INSERT INTO featureprop_pub (featureprop_id, pub_id) VALUES (pfeatureprop_id, ppub_id); RETURN currval('0'); END IF; UPDATE featureprop_pub SET WHERE featureprop_pub.featureprop_id = pfeatureprop_id AND featureprop_pub.pub_id = ppub_id RETURN pkeyid; END;