Hint: There is a column named "pma_timestamp" in table "table_a", but it cannot be referenced from this part of the query I want to use a user defined function so that while inserting values in column i want to insert last_day of the month in one column by referencing other column in same table.
my code is-
insert into table_A
(id,pma_timestamp,monthend)
values
(103,'2017-08-15',last_day(pma_timestamp));

but getting the error:

Hint: There is a column named &quot;pma_timestamp&quot; in table &quot;table_a&quot;, but it cannot be referenced from this part of the query

how to resolve this
You can't use a column if the target table in the values() clause. You will need to repeat the value you provided for that column:
insert into table_A
(id, pma_timestamp, monthend)
values
(103, '2017-08-15', last_day('2017-08-15'));

If you don't want to repeat the value, you could write an INSERT trigger that populates the monthend column. Then you wouldn't need to provide a value for it at all.

In a relational database, it's usually not a good idea to store data that can easily be derived from existing values. The monthend column is such a derived attribute. I would not store it at all, because calculating it from pma_timestamp can easily be done during a SELECT query. If you don't want to repeat the calculation, create a view that provides that information.