Re: [PATCHES] PLPGSQL OID Bug

2005-07-28 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Tom Lane wrote: I think the reason is that it's both an input and an output parameter, to handle the case where the cast function returns NULL. [ no it ain't ] In that case feel free to clean it up ... regards, tom lane

[PATCHES] PLPGSQL OID Bug

2005-07-27 Thread Kevin McArthur
This patch will resolve the oid retrieval bugs from plpgsql. There are however several other places where isnull=false was removed and replaced with isnull which may also need to be corrected. Kevin McArthur StormTide Digital Studios Inc. Index:

Re: [PATCHES] PLPGSQL OID Bug

2005-07-27 Thread Tom Lane
Kevin McArthur [EMAIL PROTECTED] writes: This patch will resolve the oid retrieval bugs from plpgsql. Applied. There are however several other places where isnull=false was removed and replaced with isnull which may also need to be corrected. The other spots seem to be OK. Thanks for the

Re: [PATCHES] PLPGSQL OID Bug

2005-07-27 Thread Neil Conway
Tom Lane wrote: The other spots seem to be OK. Thanks for the report and fix! Woops, my apologies for introducing the bug. In general I think it's worth removing explicit initialization of out parameters unless that initialization is actually needed. I thought I had checked that

Re: [PATCHES] PLPGSQL OID Bug

2005-07-27 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: BTW, is there a reason why exec_cast_value() and friends take a bool *, rather than a bool? I think the reason is that it's both an input and an output parameter, to handle the case where the cast function returns NULL. This is obviously a pretty

Re: [PATCHES] PLPGSQL OID Bug

2005-07-27 Thread Neil Conway
Tom Lane wrote: I think the reason is that it's both an input and an output parameter, to handle the case where the cast function returns NULL. The only reference to `isnull' in the body of exec_cast_value() is: if (!*isnull) { /* ... */ } i.e. it is never referenced again, let alone