I am trying to set value for timestamp column using SQLAlchemy, but I experience following error:
column "timestamp" is of type timestamp without time zone but expression is of type numeric
My table looks as folows:
class SomeTable(db.Model):
timestamp = Column(TIMESTAMP)
Insertion try looks like this:
SomeTable(timestamp=time.time())
When I use datetime.now() instead of time.time() the record is inserted into the table but when I select it from the database it has following format:
2019-04-02 11:44:24.801046
So it looks like TIMESTAMP field does not store timestamp format.
Is it regular postgres behaviour? Or am I missing something?