Re: BUG #1518: Conversions to (undocumented) SQL year-month and - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1518: Conversions to (undocumented) SQL year-month and
Date
Msg-id 15463.1111619276@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1518: Conversions to (undocumented) SQL year-month  (Roy Badami <roy@gnomon.org.uk>)
List pgsql-bugs
Roy Badami <roy@gnomon.org.uk> writes:
> Which is where my comment about EXTRACT comes in.  They can both be
> stored as 13 months, but EXTRACT (MONTH FROM ...) should return 1
> month or 13 months as appropriate.  Surely this isn't a problem, you
> know the type of the interval?

EXTRACT doesn't have access to the typmod of its input, in general.
We associate typmods with stored columns but not with the results
of arbitrary expressions.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month
Next
From: Roy Badami
Date:
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month