pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedsetting default date format
5+ messages / 3 participants
[nested] [flat]
* setting default date format
@ 2003-10-01 09:41 Gary Stainburn <gary.stainburn@ringways.co.uk>
0 siblings, 2 replies; 5+ messages in thread
From: Gary Stainburn @ 2003-10-01 09:41 UTC (permalink / raw)
To: pgsql-admin
Hi folks,
I'm kicking myself (gently) cos I can't remember/find how to do this.
I want to set the default date format to european dd-mm-yyyy format.
I can remember that I used to do it by adding '-o -e' to the command line
parameters but that was frowned upon a long time ago to be replaced by an
entry in a config file (postgresql.conf?).
Can someone tell me which file, and what I need to add.
Thanks
Gary
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: setting default date format
@ 2003-10-01 10:13 Oliver Elphick <olly@lfix.co.uk>
parent: Gary Stainburn <gary.stainburn@ringways.co.uk>
1 sibling, 1 reply; 5+ messages in thread
From: Oliver Elphick @ 2003-10-01 10:13 UTC (permalink / raw)
To: Gary Stainburn <gary.stainburn@ringways.co.uk>; +Cc: pgsql-admin
On Wed, 2003-10-01 at 10:41, Gary Stainburn wrote:
> I want to set the default date format to european dd-mm-yyyy format.
> Can someone tell me which file, and what I need to add.
In postgresql.conf:
DATESTYLE = 'Postgres,European'
--
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
========================================
"Yet if any man suffer as a Christian, let him not be
ashamed; but let him glorify God on this behalf."
I Peter 4:16
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: setting default date format
@ 2003-10-01 10:19 Peter Eisentraut <peter_e@gmx.net>
parent: Gary Stainburn <gary.stainburn@ringways.co.uk>
1 sibling, 0 replies; 5+ messages in thread
From: Peter Eisentraut @ 2003-10-01 10:19 UTC (permalink / raw)
To: Gary Stainburn <gary.stainburn@ringways.co.uk>; +Cc: pgsql-admin
Gary Stainburn writes:
> I can remember that I used to do it by adding '-o -e' to the command line
> parameters but that was frowned upon a long time ago to be replaced by an
> entry in a config file (postgresql.conf?).
datestyle in postgresql.conf, starting in PostgreSQL 7.3. -o -e should
still work, though.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: setting default date format
@ 2003-10-01 10:34 Gary Stainburn <gary.stainburn@ringways.co.uk>
parent: Oliver Elphick <olly@lfix.co.uk>
0 siblings, 1 reply; 5+ messages in thread
From: Gary Stainburn @ 2003-10-01 10:34 UTC (permalink / raw)
To: Oliver Elphick <olly@lfix.co.uk>; +Cc: pgsql-admin
On Wednesday 01 October 2003 11:13 am, Oliver Elphick wrote:
> On Wed, 2003-10-01 at 10:41, Gary Stainburn wrote:
> > I want to set the default date format to european dd-mm-yyyy format.
> >
> > Can someone tell me which file, and what I need to add.
>
> In postgresql.conf:
>
> DATESTYLE = 'Postgres,European'
Hi Oliver,
When I did this, and then did 'service postgresql restart' the service failed
to start.
I have managed to get it working by amending the pg_ctl command in
/etc/rc.d/init.d/postgresql to add
-o '-o -e'
but as I said before I seem to remember that this was frowned upon because the
next time I upgrade it'll get overridden.
BTW, I'm running 7.2.3 from the RH RPMS.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: setting default date format
@ 2003-10-01 10:46 Oliver Elphick <olly@lfix.co.uk>
parent: Gary Stainburn <gary.stainburn@ringways.co.uk>
0 siblings, 0 replies; 5+ messages in thread
From: Oliver Elphick @ 2003-10-01 10:46 UTC (permalink / raw)
To: Gary Stainburn <gary.stainburn@ringways.co.uk>; +Cc: pgsql-admin
On Wed, 2003-10-01 at 11:34, Gary Stainburn wrote:
> > In postgresql.conf:
> >
> > DATESTYLE = 'Postgres,European'
> When I did this, and then did 'service postgresql restart' the service failed
> to start.
> BTW, I'm running 7.2.3 from the RH RPMS.
The feature is available in 7.3
In 7.2 I seem to remember you can set an environemntal variable
PGDATESTYLE when starting psql, and you may be able to use SET:
SET DATESTYLE TO 'Postgres,European';
--
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
========================================
"Yet if any man suffer as a Christian, let him not be
ashamed; but let him glorify God on this behalf."
I Peter 4:16
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-10-01 10:46 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01 09:41 setting default date format Gary Stainburn <gary.stainburn@ringways.co.uk>
2003-10-01 10:13 ` Oliver Elphick <olly@lfix.co.uk>
2003-10-01 10:34 ` Gary Stainburn <gary.stainburn@ringways.co.uk>
2003-10-01 10:46 ` Oliver Elphick <olly@lfix.co.uk>
2003-10-01 10:19 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox