Re: [HACKERS] pg_attribute.attisinherited ?

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] pg_attribute.attisinherited ?
Date: 2002-08-25 09:34:21
Message-ID: 20020825173325.N14560-100000@houston.familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi Alvaro,

Yeah it is an issue that needs to be fixed. I'll have a look at your
patch once someone comments on those ordering issue?

Although I note that I've had ordering issues in the RULES test for ages
now on FreeBSD/Alpha...

Chris

On Sat, 24 Aug 2002, Alvaro Herrera wrote:

> En Sat, 24 Aug 2002 17:09:55 -0400
> I said:
>
> > > I remember Tom suggested adding something like attisinherited and
> > > preventing this kind of operations on such attributes, because one can
> > > do things such as [...]
>
> Ok, I attach a patch that does this. It doesn't include regression
> tests, docs nor the checks against unwanted operations; these will come
> later if people think this is a good approach.
>
> It passes 86 of 88 tests. The 2 failures are ordering issues (diff
> below) I don't know what causes it.
>
> Please review.
>
>
> *** ./expected/select_having.out Wed Jun 26 17:58:56 2002
> --- ./results/select_having.out Sat Aug 24 18:32:16 2002
> ***************
> *** 26,33 ****
> GROUP BY b, c HAVING b = 3;
> b | c
> ---+----------
> - 3 | BBBB
> 3 | bbbb
> (2 rows)
>
> SELECT lower(c), count(c) FROM test_having
> --- 26,33 ----
> GROUP BY b, c HAVING b = 3;
> b | c
> ---+----------
> 3 | bbbb
> + 3 | BBBB
> (2 rows)
>
> SELECT lower(c), count(c) FROM test_having
> ***************
> *** 43,50 ****
> GROUP BY c HAVING count(*) > 2 OR min(a) = max(a);
> c | max
> ----------+-----
> - XXXX | 0
> bbbb | 5
> (2 rows)
>
> DROP TABLE test_having;
> --- 43,50 ----
> GROUP BY c HAVING count(*) > 2 OR min(a) = max(a);
> c | max
> ----------+-----
> bbbb | 5
> + XXXX | 0
> (2 rows)
>
> DROP TABLE test_having;
>
> ======================================================================
>
> *** ./expected/rules.out Mon Aug 19 01:08:30 2002
> --- ./results/rules.out Sat Aug 24 18:32:46 2002
> ***************
> *** 404,412 ****
> ----------------------+--------------+------------+------------+------------
> gates | t | fired | $0.00 | $80,000.00
> gates | t | hired | $80,000.00 | $0.00
> - wiech | t | hired | $5,000.00 | $0.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> (5 rows)
>
> insert into rtest_empmass values ('meyer', '4000.00');
> --- 404,412 ----
> ----------------------+--------------+------------+------------+------------
> gates | t | fired | $0.00 | $80,000.00
> gates | t | hired | $80,000.00 | $0.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> + wiech | t | hired | $5,000.00 | $0.00
> (5 rows)
>
> insert into rtest_empmass values ('meyer', '4000.00');
> ***************
> *** 421,429 ****
> maier | t | hired | $5,000.00 | $0.00
> mayr | t | hired | $6,000.00 | $0.00
> meyer | t | hired | $4,000.00 | $0.00
> - wiech | t | hired | $5,000.00 | $0.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> (8 rows)
>
> update rtest_empmass set salary = salary + '1000.00';
> --- 421,429 ----
> maier | t | hired | $5,000.00 | $0.00
> mayr | t | hired | $6,000.00 | $0.00
> meyer | t | hired | $4,000.00 | $0.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> + wiech | t | hired | $5,000.00 | $0.00
> (8 rows)
>
> update rtest_empmass set salary = salary + '1000.00';
> ***************
> *** 439,447 ****
> mayr | t | honored | $7,000.00 | $6,000.00
> meyer | t | hired | $4,000.00 | $0.00
> meyer | t | honored | $5,000.00 | $4,000.00
> - wiech | t | hired | $5,000.00 | $0.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> (11 rows)
>
> delete from rtest_emp where ename = rtest_empmass.ename;
> --- 439,447 ----
> mayr | t | honored | $7,000.00 | $6,000.00
> meyer | t | hired | $4,000.00 | $0.00
> meyer | t | honored | $5,000.00 | $4,000.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> + wiech | t | hired | $5,000.00 | $0.00
> (11 rows)
>
> delete from rtest_emp where ename = rtest_empmass.ename;
> ***************
> *** 459,467 ****
> meyer | t | fired | $0.00 | $5,000.00
> meyer | t | hired | $4,000.00 | $0.00
> meyer | t | honored | $5,000.00 | $4,000.00
> - wiech | t | hired | $5,000.00 | $0.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> (14 rows)
>
> --
> --- 459,467 ----
> meyer | t | fired | $0.00 | $5,000.00
> meyer | t | hired | $4,000.00 | $0.00
> meyer | t | honored | $5,000.00 | $4,000.00
> wieck | t | honored | $6,000.00 | $5,000.00
> wieck | t | honored | $7,000.00 | $6,000.00
> + wiech | t | hired | $5,000.00 | $0.00
> (14 rows)
>
> --
>
> ======================================================================
>
>
> --
> Alvaro Herrera (<alvherre[a]atentus.com>)
> "Un poeta es un mundo encerrado en un hombre" (Victor Hugo)
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nigel J. Andrews 2002-08-25 13:36:19 A configure.in patch check
Previous Message Alvaro Herrera 2002-08-24 22:49:12 Re: [HACKERS] pg_attribute.attisinherited ?

Browse pgsql-patches by date

  From Date Subject
Next Message J. R. Nield 2002-08-25 20:16:44 make interfaces/perl5 build properly outside source directory
Previous Message Neil Conway 2002-08-25 05:08:01 CREATE INDEX error message