I have migrated a database from SQL Server into PostgreSQL.
A number of tables contain a ts
column(timestamp
) which stores the rowversion and is autogenerated in SQL server.
When I converted the stored procedures into PostgreSQL, I found that insert procedures are failing because the ts
column (converted to bytea
in PostgreSQL) is NOT NULL
and no explicit value is being inserted in this column.
Now, I need to implement the same in PostgreSQL as well. I am assuming encoding the current datetime into bytea
somehow will work correctly.
Let me know if there is a way to implement this.