pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Datetypes
3+ messages / 3 participants
[nested] [flat]

* Datetypes
@ 2000-01-12 13:35 Strand Johan F. <johan.f.strand@telia.se>
  2000-01-12 13:48 ` Re: [ADMIN] Datetypes Mattias Norlander <mattias@umc.se>
  2000-01-12 14:42 ` Re: [ADMIN] Datetypes Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: Strand Johan F. @ 2000-01-12 13:35 UTC (permalink / raw)
  To: pgsql-admin

Hello there !

How do I do if I want to change the variable
DATETYPES or PGDATESTYLE to ISO.
I want to se my date column like this 2000-01-12
and not 01-12-2000 when I do a select on it.

Thanks

/Johan
johan.f.strand@telia.se



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [ADMIN] Datetypes
  2000-01-12 13:35 Datetypes Strand Johan F. <johan.f.strand@telia.se>
@ 2000-01-12 13:48 ` Mattias Norlander <mattias@umc.se>
  1 sibling, 0 replies; 3+ messages in thread

From: Mattias Norlander @ 2000-01-12 13:48 UTC (permalink / raw)
  To: Strand Johan F. <johan.f.strand@telia.se>; +Cc: pgsql-admin

I use this to start up my postmaster:

su - postgres -c 'export PGDATESTYLE=ISO; postmaster -N 32 -B 256 -i -o "-S 16535 -F" 2>>/var/log/pglog >>/var/log/pglog' >>/dev/null&

... which sets the datestyle to ISO.

There is also a sql command called "SET DATESTYLE" but I can't get it to work though...

"Strand Johan F." <johan.f.strand@telia.se> writes:

> Hello there !
> 
> How do I do if I want to change the variable
> DATETYPES or PGDATESTYLE to ISO.
> I want to se my date column like this 2000-01-12
> and not 01-12-2000 when I do a select on it.
> 
> Thanks
> 
> /Johan
> johan.f.strand@telia.se
> 
> ************
> 
> 
> 

-- 
Mattias Norlander
mattias@umc.se




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [ADMIN] Datetypes
  2000-01-12 13:35 Datetypes Strand Johan F. <johan.f.strand@telia.se>
@ 2000-01-12 14:42 ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2000-01-12 14:42 UTC (permalink / raw)
  To: Strand Johan F. <johan.f.strand@telia.se>; +Cc: pgsql-admin

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hello there !
> 
> How do I do if I want to change the variable
> DATETYPES or PGDATESTYLE to ISO.
> I want to se my date column like this 2000-01-12
> and not 01-12-2000 when I do a select on it.

SET DATESTYLE TO 'ISO'  should do it.  See my book for a section on date
styles in the web documentation page.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2000-01-12 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-12 13:35 Datetypes Strand Johan F. <johan.f.strand@telia.se>
2000-01-12 13:48 ` Mattias Norlander <mattias@umc.se>
2000-01-12 14:42 ` Bruce Momjian <pgman@candle.pha.pa.us>

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