On Mon, 2011-04-18 at 10:41 -0400, Tom Lane wrote:
> However, I've come across a new issue that maybe requires discussion:
> what collation should be associated with a multi-row VALUES in FROM?
> For instance, in
>
> SELECT ... FROM
> (VALUES (1, 'foo'), (2, 'bar' COLLATE "C")) v(a,b),
> ...
>
> what collation should be imputed to references to v.b?
>
> The way the code currently works is that the first row of the VALUES
> list is inspected to determine what collation to report
Hmm, I do see this on my list of things to address, so yes, it should be
fixed. I likely got stuck because it's pretty complicated.