I want to add a column in a Postgres table. I want that the value for existing rows will be null but for new rows, it will take the default value that I'll specify in the query.
I'm running this query-
ALTER TABLE events
ADD COLUMN event_timestamp timestamp default current_timestamp
This is running fine but it is populating the current timestamp for existing rows as well. How to change the query so that it will not add a default value for existing rows?