Re: Boolean partitions syntax

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Boolean partitions syntax
Дата
Msg-id 1b9e7eb1-cd8b-9e7a-4291-5ed664b5a675@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Boolean partitions syntax  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: Boolean partitions syntax
Re: Boolean partitions syntax
Список pgsql-hackers
On 2/2/18 04:39, Amit Langote wrote:
> Most of the code does treat partition bound values as Node values doing
> coercing before calling the input value good and failing upon not being
> able to convert to the desired type for whatever reason.
> 
> create table b (a bool) partition by list (a);
> create table bt partition of b for values in (1);
> ERROR:  specified value cannot be cast to type boolean for column "a"
> LINE 1: create table bt partition of b for values in (1);
> 
> Can you say a bit more about the compatibility issues if we extend the syntax?

Without getting into the technicial details too much, this thread
surprised me.  Why do we need to add support for each kind of constant
literal separately?  That seems wrong.

There might be other options, but one way to solve this would be to
treat partition bounds as a general expression in the grammar and then
check in post-parse analysis that it's a constant.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)