Thread: Set Datestyle doesn't appear to be working
I'm running PostgreSQL 7.2.1 on a Debian Linux server. I have added the line: PGDATESTYLE=ISO,US to postmaster.conf and restarted PostgreSQL but any fields with the Date type still show up as '2002-11-06'. I want them to show up as '11-06-2002'. -- Jeff Self Information Technology Analyst City of Newport News Personnel Department Suite 200 700 Town Center Drive Newport News, VA 23606 757-926-1810
I think that is only a 7.3beta feature. --------------------------------------------------------------------------- Jeff Self wrote: > I'm running PostgreSQL 7.2.1 on a Debian Linux server. I have added the > line: PGDATESTYLE=ISO,US to postmaster.conf and restarted PostgreSQL but > any fields with the Date type still show up as '2002-11-06'. I want them > to show up as '11-06-2002'. > > -- > Jeff Self > Information Technology Analyst > City of Newport News > Personnel Department Suite 200 > 700 Town Center Drive > Newport News, VA 23606 > 757-926-1810 > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
On Wed, 2002-11-06 at 19:25, Jeff Self wrote: > I'm running PostgreSQL 7.2.1 on a Debian Linux server. I have added the > line: PGDATESTYLE=ISO,US to postmaster.conf and restarted PostgreSQL but > any fields with the Date type still show up as '2002-11-06'. I want them > to show up as '11-06-2002'. ISO format means "yyyy-mm-dd"; you are getting exactly what you asked for. The ",US" part of your spec is controlling how dates are interpreted on input, so it is not useless, but to get what you want you must specify "POSTGRES,US". -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Let all that you do be done in love." 1 Corinthians 16:14
On Wed, 2002-11-06 at 19:45, Bruce Momjian wrote: > > I think that is only a 7.3beta feature. /etc/postgresql/postmaster.conf is a Debian-specific configuration file, which specifies a few items that are not covered by postgresql.conf. In 7.2.x, that includes the default date style. In 7.3, the date style will be handled by postgresql.conf, as you say. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Let all that you do be done in love." 1 Corinthians 16:14