如何转:
=> SELECT pic.reference, spec.name FROM species spec NATURAL JOIN pictures pic
WHERE spec.name = 'Bufo bufo';
reference | name
-----------+-----------
IM000213 | Bufo bufo
IM000218 | Bufo bufo
IM000222 | Bufo bufo
IM000234 | Bufo bufo
(4 lignes)
变成类似的东西:
=> ???
references | name
--------------------------------------+-----------
IM000213,IM000218,IM000222,IM000234 | Bufo bufo
(1 ligne)
?
注意:在 postgresql 8.4