postgresql working, nested size attributes malfunctioning in view