That's fixed it. Many thanks Tom. > > "SELECT readnode4($1)",> > I think you probably want "SELECT * FROM readnode4($1)". As-is,> you're getting a single composite-type column from the SELECT.> > regards, tom lane