Hello again
> > Actually, now that I'm thinking about it, I don't really want to store
> > the value into a variable because the pk_col might be of any given
> > type. So ideally, I'd love a way to just get the value from OLD and
> > use it directly in another query. Something along the lines of:
> >
> > `EXECUTE format('SELECT * FROM %1$I.sometable WHERE pk = $1', myschma)
> > USING OLD['pk_col']`.
> >
> > I reckon I may have to look at just generating a trigger function per
> > table, or maybe look into using TG_ARGS.
So the less obvious solution that works is to create a temporary
table. A little verbose, but I get to keep the types.
`CREATE TEMPORARY TABLE _ ON COMMIT DROP AS SELECT OLD.*;`
_ as a table name makes things a little easier to type.
Rhys
Peace & Love | Live Long & Prosper