cxgn_breedbase
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
store_feature(character varying)
Parameters
Name
Type
Mode
character varying
IN
Definition
DECLARE paccession ALIAS FOR $1; pkeyid INTEGER; BEGIN SELECT INTO pkeyid feature_id FROM feature WHERE feature.accession = paccession; IF NOT FOUND THEN INSERT INTO feature (accession) VALUES (paccession); RETURN currval('feature_pk_seq'); END IF; UPDATE feature SET WHERE feature.accession = paccession RETURN pkeyid; END;