Use a VALUES expression to generate an ad-hoc table and join to the other tables to get the respective IDs.

INSERT INTO groupmember (person_id, group_id)
SELECT p.person_id, g.group_id
FROM  (
   VALUES
     ('alice'::varchar, 'girls'::varchar)
   , ('bob','boys',
   , ('alice','coolkids')
   , ('bob','coolkids')
  ) x (username, group_name)
JOIN   person p  USING (username)
JOIN   "group" g USING (group_name);


Aside: don't use the reserved word group as table name.

INSERT multiple values via join
I've noticed a trend (at least on the Google Play store) of application prices ending in x.99, while 'donation' apps usually end on the dollar.  I see the reasoning behind the psychology that makes a user purchase a $0.99 item over one that costs $1.00, but why the trend to keep the prices on the dollar for donation items? 
