I have several tables in a database, some containing timestamps like so:
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
Now I want to populate these tables using several pg/plsql functions, which contain INSERT statements that do not specify the created_at
stamp. I call these functions with a single command line:
psql -U bob -h localhost tests -c "select * from test.main()"
I would assume that, even though the sql takes a very short time to execute, I would end up with slight variations in timestamp values. Surprisingly, it is not the case, and timestamps are identical down to the microsecond.
Does anyone know the reason for this behavior (and if there is a way to avoid that)?
Thanks