1
SELECT fs.feature_id,
2
'cvterm'::text AS type,
3
s.name AS attribute
4
FROM cvterm s,
5
feature_cvterm fs
6
WHERE (fs.cvterm_id = s.cvterm_id)
7
UNION ALL
8
SELECT fs.feature_id,
9
'dbxref'::text AS type,
10
(((d.name)::text || ':'::text) || (s.accession)::text) AS attribute
11
FROM dbxref s,
12
feature_dbxref fs,
13
db d
14
WHERE ((fs.dbxref_id = s.dbxref_id) AND (s.db_id = d.db_id))
15
UNION ALL
16
SELECT fs.feature_id,
17
'synonym'::text AS type,
18
s.name AS attribute
19
FROM synonym s,
20
feature_synonym fs
21
WHERE (fs.synonym_id = s.synonym_id)
22
UNION ALL
23
SELECT fp.feature_id,
24
cv.name AS type,
25
fp.value AS attribute
26
FROM featureprop fp,
27
cvterm cv
28
WHERE (fp.type_id = cv.cvterm_id)
29
UNION ALL
30
SELECT fs.feature_id,
31
'pub'::text AS type,
32
(((s.series_name)::text || ':'::text) || s.title) AS attribute
33
FROM pub s,
34
feature_pub fs
35
WHERE (fs.pub_id = s.pub_id);