From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Kevin Grittner <kgrittn(at)ymail(dot)com>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Steve Singer <steve(at)ssinger(dot)info>, Andres Freund <andres(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: record identical operator |
Date: | 2013-09-24 12:49:48 |
Message-ID: | CA+Tgmobfd-ZVpwTdc7UEqAxqcZr3f4hkokLWyFApyhZTvOQz0w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 24, 2013 at 7:14 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>> Of course, you don't need citext, or any other data type with a loose
>> notion of equality, to generate that sort of problem:
> [...]
>> rhaas=# set datestyle = 'german';
>> SET
>
> I'm talking about *planner differences* changing the results. If we've
> got a ton of cases where a different plan means different output, then
> we've got some serious problems. I'd argue that it's pretty darn clear
> that datestyle is going to be a *slightly* different animal. My example
> doesn't *require* changing any GUCs, it was just expedient for
> illustration.
I'm completely confused, here. What's so special about planner
differences? Obviously, there are tons of queries that can produce
different results based on planner differences, but materialized views
didn't create that problem and they aren't responsible for solving it.
Also, even restricting ourselves to planner differences, there's no
particular link between the behavior of the type's equality operator
and whether or not the query always produces the same results. For
example, let's consider good old text.
rhaas=# create table tag_data (id integer, tag text, userid text,
primary key (id, tag));
CREATE TABLE
rhaas=# insert into tag_data values (1, 'foo', 'tom'), (1, 'bar',
'dick'), (2, 'baz', 'harry');
INSERT 0 3
rhaas=# select id, string_agg(tag||':'||userid, ', ') tags from
tag_data group by 1;
id | tags
----+-------------------
1 | foo:tom, bar:dick
2 | baz:harry
(2 rows)
rhaas=# set enable_seqscan=false;
SET
rhaas=# select id, string_agg(tag||':'||userid, ', ') tags from
tag_data group by 1;
id | tags
----+-------------------
1 | bar:dick, foo:tom
2 | baz:harry
(2 rows)
Now texteq() is just a glorified version of memcmp(), so what does
this complaint possibly have to do with Kevin's patch, or even
materialized views in general?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Stas Kelvich | 2013-09-24 13:07:52 | Re: [HACKERS] Cube extension point support // GSoC'13 |
Previous Message | Andrew Dunstan | 2013-09-24 12:48:56 | Re: PostgreSQL 9.3 beta breaks some extensions "make install" |