问题
I know that to create a column in mysql is like this
'date' timestamp not null default CURRENT_TIMESTAMP,
how to postgresql?
回答1:
It's the same, you just have to fix the identifier quoting to use SQL standard "identifer quoting"
:
"date" timestamp not null default CURRENT_TIMESTAMP,
but really, you should not use "date"
as an identifier.
来源:https://stackoverflow.com/questions/23518399/create-column-for-auto-date-in-postgresql