cxgn_breedbase
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
store_gene(character varying)
Parameters
Name
Type
Mode
character varying
IN
Definition
DECLARE pname ALIAS FOR $1; pkeyid INTEGER; BEGIN SELECT INTO pkeyid gene_id FROM gene WHERE gene.name = pname; IF NOT FOUND THEN INSERT INTO gene (name) VALUES (pname); RETURN currval('gene_pk_seq'); END IF; UPDATE gene SET WHERE gene.name = pname RETURN pkeyid; END;