Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres
Дата
Msg-id 20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres
Список pgsql-bugs
On 2016-02-04 04:02:04 -0800, Peter Geoghegan wrote:
> --- a/src/test/regress/expected/rules.out
> +++ b/src/test/regress/expected/rules.out
> @@ -2846,7 +2846,7 @@ SELECT definition FROM pg_rules WHERE tablename = 'hats' ORDER BY rulename;
>   CREATE RULE hat_nosert AS                                                                  +
>       ON INSERT TO hats DO INSTEAD  INSERT INTO hat_data (hat_name, hat_color)               +
>     VALUES (new.hat_name, new.hat_color) ON CONFLICT(hat_name COLLATE "C" bpchar_pattern_ops)+
> -   WHERE (hat_data.hat_color = 'green'::bpchar) DO NOTHING                                  +
> +   WHERE (hat_color = 'green'::bpchar) DO NOTHING                                           +
>     RETURNING hat_data.hat_name,                                                             +
>       hat_data.hat_color;
>  (1 row)
> @@ -2871,7 +2871,7 @@ SELECT tablename, rulename, definition FROM pg_rules
>   hats      | hat_nosert | CREATE RULE hat_nosert AS
+
>             |            |     ON INSERT TO hats DO INSTEAD  INSERT INTO hat_data (hat_name, hat_color)
+
>             |            |   VALUES (new.hat_name, new.hat_color) ON CONFLICT(hat_name COLLATE "C"
bpchar_pattern_ops)+
> -           |            |   WHERE (hat_data.hat_color = 'green'::bpchar) DO NOTHING
+
> +           |            |   WHERE (hat_color = 'green'::bpchar) DO NOTHING
+
>             |            |   RETURNING hat_data.hat_name,
+
>             |            |     hat_data.hat_color;
>  (1 row)

Can you add code to execute the resulting statements? Because obviously
just seeing the output ain't enough. Seems like an easily repeatable
error, and the regression test scase ought to be pretty easy with a DO
and a loop.

Andres

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres