Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty
Дата
Msg-id 24527.1299795412@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty  (Martijn van Oosterhout <kleptog@svana.org>)
Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
I wrote:
> A post-pass is not out of the question, but it's enough unlike
> everything else the parser does that I'm not too thrilled about it.

On the other hand ... one thing that's been bothering me is that
select_common_collation assumes that "explicit" collation derivation
doesn't bubble up in the tree, ie a COLLATE is only a forcing function
for the immediate parent expression node.  It's not at all clear to me
that that's a correct reading of the spec.  If it's not, the only way
we could make it work correctly in the current design is to keep
*two* additional fields, both the collation OID and an explicit/implicit
derivation flag.  Which would be well past the level of annoying.
But in a post-pass implementation it would be no great trouble to do
either one, and we'd not be looking at a forced initdb to change our
minds either.

Maybe a post-pass, with only collation-to-apply fields actually stored
in the tree, is the way to go.

Comments?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: FuncExpr.collid/OpExpr.collid unworkably serving double duty