Re: Question about PARTIAL DATE type/s

From: r d <rd0002(at)gmail(dot)com>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Question about PARTIAL DATE type/s
Date: 2012-10-07 21:12:53
Message-ID: CALtFtE+3+469HtdJcWQTGiXcNzONG+B91ne4wXy0Wsg71JKcTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I suspected that this would be the answer.

Thank you lots for your kind help, Daniele & Tom [?]

On 7 October 2012 16:46, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>wrote:

> On Sun, Oct 7, 2012 at 3:03 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> writes:
> >> Note: it exploits to_date() parsing '200013' as '2001-01', which is
> >> reasonable but haven't found documented and don't know how much
> >> reliable. Writing a safer "one month later" function is left as
> >> exercise.
> >
> > Consider adding '1 month'::interval to the month start date.
> >
> > (This function relies on text-munging way too much for my taste.
> > There's almost always a better way to do it than that.)
>
> Didn't realize intervals store months/days info separately: I thought
> an interval was just a vector in the timestamp space. Nice surprise.
>
> -- Daniele
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2012-10-07 21:40:59 Re: [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
Previous Message Vincent Veyron 2012-10-07 20:13:53 Re: [PL/PGSQL] column name substitution in PG8.4