On Mon, Apr 27, 2009 at 03:37:22PM -0600, Scott Marlowe wrote: > On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma wrote: > > At this point I don't think that there is a way for this function to > > know the correct table type of new.* since page_access_... is still > > only a concatenated string. There there a way to cast new.* to the > > correct table type as part of this insert statement? > > I tried casting the new.*::page_access and that didn't work. For now > I'll carry on with the complete listing of everything. In SQL I can do: PREPARE _p(parent) AS INSERT INTO subtable SELECT ($1).*; EXECUTE _p(new); DEALLOCATE _p; however this seems to interact badly with the EXECUTE in plpgsql, not sure how to work around that. -- Sam http://samason.me.uk/ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general