Re: [HACKERS] Same expression more than once in partition key

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Same expression more than once in partition key
Дата
Msg-id 7636.1498226057@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Same expression more than once in partition key  (Yugo Nagata <nagata@sraoss.co.jp>)
Ответы Re: [HACKERS] Same expression more than once in partition key  (Yugo Nagata <nagata@sraoss.co.jp>)
Re: [HACKERS] Same expression more than once in partition key  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Yugo Nagata <nagata@sraoss.co.jp> writes:
> When we create a range partitioned table, we cannot use
> a column more than once in the partition key.

>  postgres=# create table t (i int) partition by range(i,i);
>  ERROR:  column "i" appears more than once in partition key

AFAIK, that's just a simple test for obvious mistakes; it's not a
property that's essential for correctness.

> However, I can use same expression more than once in partition key.

... and so, I can't get excited about extending it to expressions.
Where would you stop --- for example, are i and (i) equal?  What
about (i) and (case when true then i else j end)?  In principle,
the system could recognize both those identities, but it seems
silly to expend code on it just for nagware purposes.
        regards, tom lane



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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: [HACKERS] transition table behavior with inheritance appears broken
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: [HACKERS] Pluggable storage