I want to write some basic functions for on postgres but I want to pass a parameter that tells the function which schema to run it on. I dont really want to get into dynamic SQL if possible. Everything I have tried so far fails (passing in the schema name as a varchar etc...), has anyone done this before?

Any help would be much appreciated as this is driving me up the wall!

Thanks in advance, Seb