pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zagato <zagato.gekko@gmail.com>
To: Francois Figarola <francois.figarola@laposte.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Interval Format
Date: Sat, 22 Nov 2008 01:08:15 -0500
Message-ID: <98028b00811212208p5cc28e78ucf688640c3ec6f84@mail.gmail.com> (raw)
In-Reply-To: <49279C63.8090909@laposte.net>
References: <98028b00811211739qb4a5e6bqf478bee397ea3596@mail.gmail.com>
	<98028b00811211740r44025235nf81578e1e9436f1d@mail.gmail.com>
	<49279C63.8090909@laposte.net>

Douh..... !!! Jejej... well i think that if not possible to use a some kind
of default_justify_inteval, then i will try to update my SQLs...

Thanks :D

Alan Jairo Acosta

On Sat, Nov 22, 2008 at 12:45 AM, Francois Figarola <
francois.figarola@laposte.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> Zagato a écrit :
> > Hi everyone... im looking for some help with the interval format
> > between two diferents versions of postgres....
> > I have instaled in my old server postgres 8.0.3 and in my new one
> > postgres 8.3.5. <http://8.3.5./;..
> > Everything in both looks works nice but i notice a little difference
> > that is taking my crazy..
> > I have som SQL that in 8.0.3 do:
> > # SELECT '32 hours'::INTERVAL;
> >     interval
> > -----------------
> >  @ 1 day 8 hours
> > (1 row)
> >
> > And in 8.3.5 do:
> > seg_veh2=# SELECT '@ 32 hours'::INTERVAL;
> >   interval
> > ------------
> >  @ 32 hours
> > (1 row)
> If you really want your interval in normalized form (like days , hours
> parts...)
> with versions from 8.1 and newers, you must use the justify_* function :
>
> |SELECT justify_hours('@ 32 hours'::INTERVAL);
>
> will give you :
>
>  justify_hours
> - ----------------
>  1 day 08:00:00
>
> and
>
> SELECT justify_days('45 days @ 32 hours'::INTERVAL);
>
> give
>
>      justify_days
> - ------------------------
>  1 mon 15 days 32:00:00
>
> or global function
>
> ||SELECT justify_interval('45 days @ 32 hours'::INTERVAL);
>
> will give
>
>    justify_interval
> - ------------------------
>  1 mon 16 days 08:00:00
>
> |
> >
> > Why i unable to get my old style of interval, i really need to see
> > the day part.... im using datestyle german in both.... im try with
> > "SET IntervalStyle TO..." but i get this error:
> > ERROR:  unrecognized configuration parameter "intervalstyle"
> > looking throw the forums i get that this new param its just for
> > postgres 8.4...
> > So.. how can i recover my "days" part...
> >
> > Any help it appreciate... thanks :D
> Hope it can helps !
> >
> > Alan Jairo Acosta
> >
> Regards, François Figarola.
>
> - --
> - ----------------------------
>
> L'éducation, c'est un peu comme une maladie sexuellement transmissible.
> Ca rend inapte à des tas de besognes, puis ça démange d'en faire
> profiter les autres.
> Terry Pratchett in "Le père Porcher" (coll. Les Annales du Disque-Monde).
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkknnGMACgkQXRu8MjnlzXks1wCaA+RIqhPk5BuGJeJ/jTn24Sg1
> OPcAn39TO8vBYRuWcBuyysPl6+L0cD4L
> =3Ww3
> -----END PGP SIGNATURE-----
>
>

view thread (6+ messages)

Message-ID: <98028b00811212208p5cc28e78ucf688640c3ec6f84@mail.gmail.com>
Permalink:  ../98028b00811212208p5cc28e78ucf688640c3ec6f84@mail.gmail.com/
Also on:    postgresql.org/message-id/98028b00811212208p5cc28e78ucf688640c3ec6f84@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: zagato.gekko@gmail.com, francois.figarola@laposte.net
  Subject: Re: Interval Format
  In-Reply-To: <98028b00811212208p5cc28e78ucf688640c3ec6f84@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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