Skip site navigation (1) Skip section navigation (2)

Re: Converting a timestamp to a date when it contains nulls.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Richards" <michael(at)fastmail(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Converting a timestamp to a date when it contains nulls.
Date: 2000-07-24 03:21:51
Message-ID: 15083.964408911@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Michael Richards" <michael(at)fastmail(dot)ca> writes:
>>> Shouldn't all casts be able to handle the case where it is NULL?
>> 
>> Yup, it's a bug.  It's fixed in current sources.

> Is there a patch available that I can apply to the 7.0.2 source to 
> fix the problem? Or is there going to be a 7.0.3 that I should wait 
> for?

Just look for the place where the error is being spit out (somewhere in
backend/utils/adt/) and change the "elog(ERROR, ...)" call into
"return NULL".  Should work, but I haven't tried it in 7.0.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Michael RichardsDate: 2000-07-25 23:03:38
Subject: Index selection on a large table
Previous:From: Michael RichardsDate: 2000-07-23 19:52:37
Subject: Re: Converting a timestamp to a date when it contains nulls.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group