Thread: Setting DateStyle

Setting DateStyle

From
Jeff Self
Date:
I'm trying to set my datestyle automatically in postgresql.conf this
way:
datestyle = 'iso, us'

But Postgresql won't start when I do this. I get the following message
in my logfile:
FATAL 1:  'datestyle' is not a valid option name

From other examples of postgresql.conf I've looked at, this should work.
What's going on?

--
Jeff Self
Information Technology Analyst
City of Newport News
Personnel Department Suite 200
700 Town Center Drive
Newport News, VA 23606
757-926-1810


Re: Setting DateStyle

From
Tom Lane
Date:
Jeff Self <jself@nngov.com> writes:
> I'm trying to set my datestyle automatically in postgresql.conf this
> way:
> datestyle = 'iso, us'

That will work as of PG 7.3, but not in prior releases.  (Datestyle and
a couple of other slightly-weird SET variables didn't get folded into
GUC until 7.3.)  The workaround in old releases is to set PGDATESTYLE in
the postmaster's environment, instead.

            regards, tom lane