pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@heroku.com>
Cc: Önder Kalacı <onderkalaci@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres
Date: Thu, 4 Feb 2016 13:11:41 +0100
Message-ID: <20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de> (raw)
In-Reply-To: <CAM3SWZSNiq6Eo_Y76LfQuYJmQdkvnz0nDvWQ2=XNeRi6wMPvSw@mail.gmail.com>
References: <20160126123420.2539.85100@wrigleys.postgresql.org>
	<CAM3SWZTiVOu3qOuaEri8G4VqEFf_w2auLMPZeCBVYCpChR8Wmw@mail.gmail.com>
	<CACawEhW1nBgeNn1r3hGgdyrJjbmaprrSGJdcQFpL-+Wj5C6JxA@mail.gmail.com>
	<CAM3SWZSNiq6Eo_Y76LfQuYJmQdkvnz0nDvWQ2=XNeRi6wMPvSw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (14+ messages)  latest in thread

Message-ID: <20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de>
Permalink:  ../20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, pg@heroku.com, onderkalaci@gmail.com
  Subject: Re: BUG #13891: Deparsed arbiter WHERE clauses cannot be parsed by Postgres
  In-Reply-To: <20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de>
  References: <20160126123420.2539.85100@wrigleys.postgresql.org> <CAM3SWZTiVOu3qOuaEri8G4VqEFf_w2auLMPZeCBVYCpChR8Wmw@mail.gmail.com> <CACawEhW1nBgeNn1r3hGgdyrJjbmaprrSGJdcQFpL-+Wj5C6JxA@mail.gmail.com> <CAM3SWZSNiq6Eo_Y76LfQuYJmQdkvnz0nDvWQ2=XNeRi6wMPvSw@mail.gmail.com> <20160204121141.bl3dbdnv2vipl4j5@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox