I think you're looking for this:
create tableC as
(select st_intersection(a.geom, g.geom) as geom, a.name as name
from tableA as a, tableB as b
where st_intersects(a.geom, g.geom));
By looking at each intersection separately, you can access all the included data.