I have a table tab1
with four columns col1
, col2
, col3
and col4
.
I want to create a function like f4(a)
where a
is defined by user and if user types select f4(col1)
he gets column tab1.col1
.
Is there any way to create such function in PostgreSQL?