#14248: Date and DateTime fields, auto_now_add and PostgreSQL
---------------------------------------------------+------------------------
Reporter: [email protected] | Owner: nobody
Status: closed | Milestone: 1.3
Component: Database layer (models, ORM) | Version: 1.2
Resolution: invalid | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by mtredinnick):
For future reference (in case we ever revisit this): although the
functions provided by PostgreSQL are non-standard and not supported across
all backends, PostgreSQL, along with all SQL-compliant dbs, provide
constant-like functions `CURRENT_TIMESTAMP`, `CURRENT_DATE`, etc, that
provide the same functionality. What I don't know at the moment (and
aren't motivated to check right this minute) is if there are any backends
we support which don't implement this part of the SQL standard.
Note, however, that this doesn't make this bug a laydown "accept". There
are advantages to implementing `auto_now` and `auto_now_add` in Python --
it allows them to be overridden as part of the saving process (for
timezone adjustments in some funky situation, for example).
--
Ticket URL: <http://code.djangoproject.com/ticket/14248#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.