I'm trying to create a function (language 'sql') with table name as single input parameter, but I always get syntax errors at "$1". Probably I am use wrong types.
simple example: create function testfct (text) language sql as 'select count(*) from $1' fails. I tested type alternatives to 'text' , such as 'name' or 'sql_identifier' - no success. What is the right type ? ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend