pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: 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: Sun, 07 Feb 2016 15:02:11 -0500
Message-ID: <22766.1454875331@sss.pgh.pa.us> (raw)
In-Reply-To: <20160204211534.j7wwi56b62mjcvfo@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>
	<CAM3SWZTYhyxDFp_=hz052+vosgRhNOWmzs7SoGW-krmbW4998Q@mail.gmail.com>
	<A675BDE8-588C-4316-9DA4-4646E614128C@anarazel.de>
	<CAM3SWZTDkXGR_QcaM5Q6TfuENWd1-7WQvo84n+7JhGL8EBa9vg@mail.gmail.com>
	<20160204204908.ew45cz73rsjgyptd@alap3.anarazel.de>
	<CAM3SWZQoejSg5KB8pAFVUqci-uk7KmLJLFBWt=4EyvyB5W-ShA@mail.gmail.com>
	<20160204211534.j7wwi56b62mjcvfo@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Andres Freund <andres@anarazel.de> writes:
> On 2016-02-04 13:09:43 -0800, Peter Geoghegan wrote:
>> Sorry, I still don't get it. How does that help with ON CONFLICT
>> arbiter WHERE clause deparsing?

> The bug this thread is about was actually visible in regression test
> output, as the wrong output of pg_rules output. As were a number of
> previous bugs. So it seems time to actually make sure that the output of
> the rules we generate to test deparsing actually do something remotely
> sane, by executing the deparsed sql. Obviously human inspection is not
> sufficient.  You can do so by executing deparsed output of a rule or a
> view (both should be doable afacis).

That's all very well, but we have a release to get out tomorrow, so
I went ahead and pushed Peter's patch (with some cosmetic fiddling).

I think actually Andres' proposal wouldn't be all that helpful, because
it would only detect deparse problems for constructs that happen to
appear in views/rules that exist at the instant the test runs.

What I'd be inclined to think about is something comparable to the
COPY_PARSE_PLAN_TREES #define, that is an option to make postgres.c
pass every non-utility statement through deparse and reparse and then
compare the resulting parse trees.  It'd be a bit slow but it would
cover every type of syntax exercised anywhere in the regression tests.

			regards, tom lane


-- 
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: <22766.1454875331@sss.pgh.pa.us>
Permalink:  ../22766.1454875331@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22766.1454875331@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, 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: <22766.1454875331@sss.pgh.pa.us>
  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> <CAM3SWZTYhyxDFp_=hz052+vosgRhNOWmzs7SoGW-krmbW4998Q@mail.gmail.com> <A675BDE8-588C-4316-9DA4-4646E614128C@anarazel.de> <CAM3SWZTDkXGR_QcaM5Q6TfuENWd1-7WQvo84n+7JhGL8EBa9vg@mail.gmail.com> <20160204204908.ew45cz73rsjgyptd@alap3.anarazel.de> <CAM3SWZQoejSg5KB8pAFVUqci-uk7KmLJLFBWt=4EyvyB5W-ShA@mail.gmail.com> <20160204211534.j7wwi56b62mjcvfo@alap3.anarazel.de> <22766.1454875331@sss.pgh.pa.us>

* 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