On Thu, 27 Mar 2003, Tom Lane wrote:
> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > That's because the set default uses a pretty ugly hack. It plans the
> > query with =NULL and then replaces the NULL with the default value's
> > stored plan info. My first guess is that it's something with this that's
> > causing the crash.
>
> Yeah, it's failing to allow for the possible need to insert a type
> coercion step. This code shouldn't be here at all, really --- it should
> be using build_column_default instead of messing about with the
> default expression directly. I can fix it, unless you want to...
Either way works for me. :) I'd guess it should look more like the default
inserting stuff in copy for getting the expression's value. Doesn't look
too hard to change (might take me a couple of days due to work, but I
don't think that'll be a big issue).