This is a discussion on What is the syntax for setting a default date in PostgreSQL? within the Pgsql General forums, part of the PostgreSQL category; --> This issue always stumps me. I need to set the default date for a column in postgres. A value ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| This issue always stumps me. I need to set the default date for a column in postgres. A value for today, today + x days, now (timestamp), now + x amount of days. I never seem to be able to locate it in the documentation or online. Can anyone post it here once and for all for posterity? I will be much obliged ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| ||||
| Frank Church wrote: > This issue always stumps me. I need to set the default date for a column in > postgres. A value for today, today + x days, now (timestamp), now + x amount of > days. CURRENT_DATE, CURRENT_DATE + x, now(), now() + 'x days'::interval are a few options. -- Alban Hertroys alban@magproductions.nl magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World // ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |