I want to set the default value for the column building
and floor
in my table points
in the below function called test(b,f)
Create or replace function test(b text, f text) returns void as
$$
Begin
Alter table points alter COLUMN building set default b;
Alter table points alter COLUMN floor set default f;
End;
$$
language plpgsql;
When I run select test('Shopping Mall','03')
it gives me below error:
column b does not exist
It seems that I cannot use a function arguments b
in the alter ...
query?