cxgn_breedbase
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
store_genesynonym(character varying)
Parameters
Name
Type
Mode
character varying
IN
Definition
DECLARE pgsynonym ALIAS FOR $1; pkeyid INTEGER; BEGIN SELECT INTO pkeyid genesynonym_id FROM genesynonym WHERE genesynonym.gsynonym = pgsynonym; IF NOT FOUND THEN INSERT INTO genesynonym (gsynonym) VALUES (pgsynonym); RETURN currval('genesynonym_pk_seq'); END IF; UPDATE genesynonym SET WHERE genesynonym.gsynonym = pgsynonym RETURN pkeyid; END;