pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: support@maerix.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: Re: BUG #11617: issue with dump/restore involving view with hstore data type embedded in where condition
Date: Fri, 9 Jan 2015 00:58:19 -0500
Message-ID: <20150109055819.GB2489618@tornado.leadboat.com> (raw)
In-Reply-To: <21569.1420643530@sss.pgh.pa.us>
References: <20141009200031.25464.53769@wrigleys.postgresql.org>
	<544ACDAB.7060904@vmware.com>
	<11046.1414190207@sss.pgh.pa.us>
	<22372.1414286907@sss.pgh.pa.us>
	<20150107074037.GA2375451@tornado.leadboat.com>
	<21569.1420643530@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Wed, Jan 07, 2015 at 10:12:10AM -0500, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > Is there something precluding implementation of an all-numeric-types opfamily
> > that contains the existing default btree opclass operators?  That wouldn't
> > solve every example like this, but it would help here among other places.
> 
> That solves only the first example I came up with, not the general
> problem.

Correct.

> >> Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> >>> I don't think this can be solved without some additional syntax, for 
> >>> specifying the equality operator explicitly. I propose that we add an 
> >>> optional USING <operator> after the problematic expressions:
> 
> > The similar situation with IN -> =ANY is tolerable, and I could be content
> > with ruleutils deparsing that way every time.  That's certainly the safe fix.
> 
> That's completely not comparable, because =ANY is still valid/standard
> SQL syntax.  I don't see how you can justify the idea that introducing
> new, nonstandard syntax for a fundamental SQL operator is better than
> introducing a new operator selection rule.

I weight various priorities as follows; higher is better:

8 - backward compatibility for applications
7 - dump/restore cycle working
5 - query behavior predictable by non-hackers
2 - beauty of ruleutils.c output
1 - limiting use of nonstandard SQL in ruleutils.c output

Hence my conclusion above.  Also, I have more than once written an application
query that would have used IS DISTINCT but for the inability to reach a
specific operator; the proposed syntax is an independently-useful feature.

> Keep in mind also that IS DISTINCT FROM is just the tip of the iceberg.
> There's also the shorthand CASE syntax, and probably some other cases
> that I'm not recalling in my caffeine-deprived state.

The list:

IS [NOT] DISTINCT
[NOT] IN
JOIN USING, NATURAL JOIN 
CASE <expr> WHEN
NULLIF


-- 
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 (7+ messages)

Message-ID: <20150109055819.GB2489618@tornado.leadboat.com>
Permalink:  ../20150109055819.GB2489618@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20150109055819.GB2489618@tornado.leadboat.com

 · 

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: noah@leadboat.com, tgl@sss.pgh.pa.us, hlinnakangas@vmware.com, support@maerix.com
  Subject: Re: BUG #11617: issue with dump/restore involving view with hstore data type embedded in where condition
  In-Reply-To: <20150109055819.GB2489618@tornado.leadboat.com>
  References: <20141009200031.25464.53769@wrigleys.postgresql.org> <544ACDAB.7060904@vmware.com> <11046.1414190207@sss.pgh.pa.us> <22372.1414286907@sss.pgh.pa.us> <20150107074037.GA2375451@tornado.leadboat.com> <21569.1420643530@sss.pgh.pa.us> <20150109055819.GB2489618@tornado.leadboat.com>

* 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