Re: xmlelement AND timestamps.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lynn Dobbs <lynn(dot)dobbs(at)creditlink(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: xmlelement AND timestamps.
Date: 2017-02-14 02:59:04
Message-ID: 10204.1487041144@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Lynn Dobbs <lynn(dot)dobbs(at)creditlink(dot)com> writes:
> I just migrated from 9.2.4 to 9.6.1 and had several user created
> functions fail.

> Recreating the failure with "SELECT xmlelement(name foo,
> 'infinity'::timestamp)
> ERROR: timestamp out of range
> DETAIL: XML does not support infinite timestamp values.

> I don't find anything in the documentation that explains this. I
> consider this a regression.

So far as I can tell, Postgres has rejected converting infinite timestamps
to XML since 8.3 (cf commit 7b76bfbe1). Certainly the above example fails
exactly like that in 9.2. If you think there's a regression here, you
need to show us a case that actually behaves differently in 9.2 and 9.6.

(Speculating wildly, I imagine that your problem has something to do with
9.6 trying to fold a subexpression to a constant in a case where 9.2
didn't, and in fact didn't evaluate the subexpression at all. But you'd
need a much larger example to demonstrate such a behavior.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2017-02-14 03:27:35 Re: xmlelement AND timestamps.
Previous Message Michael Paquier 2017-02-14 02:26:31 Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).