Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set") - Mailing list pgsql-hackers

From David Johnston
Subject Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")
Date
Msg-id 1389063624857-5785631.post@n5.nabble.com
Whole thread Raw
In response to Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")  (David Johnston <polobo@yahoo.com>)
Responses Re: Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")
List pgsql-hackers
David Johnston wrote
> 
> Tom Lane-2 wrote
>> I kinda forgot about this bug when I went off on vacation:
>> http://www.postgresql.org/message-id/

>> E1UnCv4-0007oF-Bo@.postgresql

> 
> Just to clarify:
> 
> This patch will cause both executions of the example query to fail with
> the "set-valued function..." error.
> 
> Also, the reason the "::varchar" one did not fail was because not cast
> function was ever called but the "::varchar(30)" forced a function call
> and thus prompted the error when the second record and resultant
> regexp_matches expression was encountered.
> 
> Thanks!
> 
> David J.

Sorry for the imprecise English.  I believe both of the following items but
would like confirmation/clarification of my understanding.  

The whole "varchar/varchar(30)" discrepancy is bothersome and since the
example forces a function-call via the use of "lower(...)", and doesn't test
the non-function situation, I am concerned this patch is incorrect.

If the first item is not true, i.e. this patch makes both alternatives work,
then I think the wrong "solution" was chosen - or at least not fully vetted.

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Fixing-bug-8228-set-valued-function-called-in-context-that-cannot-accept-a-set-tp5785622p5785631.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [bug fix] multibyte messages are displayed incorrectly on the client
Next
From: Tom Lane
Date:
Subject: Re: Get more from indices.