#24894: Add CURRENT_TIMESTAMP function to contrib.postgres ----------------------------------+-------------------------------------- Reporter: adamchainz | Owner: adamchainz Type: New feature | Status: new Component: contrib.postgres | Version: 1.8 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------------+-------------------------------------- Changes (by mjtamlyn):
* stage: Unreviewed => Accepted Comment: Ok, I think I can agree with Carl here. Let's add `TransactionNow()` on the condition we document the difference, and explain to non-pg users how they can fudge `TransactionNow()` like behaviour using the first of my examples above. Another related question - does `default=Now()` on a model field work? I imagine it may not as expressions are not deconstructible so it can't work in migrations? Have expressions accidentally given us database level default support, and if so can we use that for UUID pks? -- Ticket URL: <https://code.djangoproject.com/ticket/24894#comment:5> Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.96bbe9e499bf10b921c0ee04152716a4%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.