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