Bruce> What happens if you store '13 months' into an interval
Bruce> column that is YEAR TO MONTH? Does extract MONTH return 1
Bruce> or 13?
In standard SQL the MONTH field of INTERVAL YEAR TO MONTH can't
contain a value greater than 11. Though I don't immediately see how
you'd go about storing 13 in the month field. I don't think there's
an analogue of EXTRACT that allows you to set fields, is there?
Bruce> The lack of complaints all these years perhaps means people
Bruce> either don't care or accept the PG behavior.
To be honest, I don't really care :-)
I try to write my SQL in as standard a way as possible, in case I
later want to port to another database...
I would be perfectly happy for
INTERVAL '1' MONTH
to be a syntax error. I just don't like the fact that it gives me a
Taking out the ISO support from the parser is a valid fix as far as
I'm concerned (though actually making it do the ISO thing would
obviously be nicer)
In response to
pgsql-bugs by date
|Next:||From: Roy Badami||Date: 2005-03-23 23:26:48|
|Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser, |
|Previous:||From: Tom Lane||Date: 2005-03-23 23:07:56|
|Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and |