cxgn_breedbase
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
store_feature_dbxref(integer)
Parameters
Name
Type
Mode
integer
IN
Definition
DECLARE pdbxref_id ALIAS FOR $1; pkeyid INTEGER; BEGIN SELECT INTO pkeyid feature_dbxref_id FROM feature_dbxref WHERE feature_dbxref.feature_dbxref_id = pfeature_dbxref_id AND feature_dbxref.dbxref_id = pdbxref_id; IF NOT FOUND THEN INSERT INTO feature_dbxref (dbxref_id) VALUES (pdbxref_id); RETURN currval('feature_dbxref_pk_seq'); END IF; UPDATE feature_dbxref SET WHERE feature_dbxref.feature_dbxref_id = pfeature_dbxref_id AND feature_dbxref.dbxref_id = pdbxref_id RETURN pkeyid; END;