You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(10) |
May
(17) |
Jun
(3) |
Jul
|
Aug
|
Sep
(8) |
Oct
(18) |
Nov
(51) |
Dec
(74) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(47) |
Feb
(44) |
Mar
(44) |
Apr
(102) |
May
(35) |
Jun
(25) |
Jul
(56) |
Aug
(69) |
Sep
(32) |
Oct
(37) |
Nov
(31) |
Dec
(16) |
2012 |
Jan
(34) |
Feb
(127) |
Mar
(218) |
Apr
(252) |
May
(80) |
Jun
(137) |
Jul
(205) |
Aug
(159) |
Sep
(35) |
Oct
(50) |
Nov
(82) |
Dec
(52) |
2013 |
Jan
(107) |
Feb
(159) |
Mar
(118) |
Apr
(163) |
May
(151) |
Jun
(89) |
Jul
(106) |
Aug
(177) |
Sep
(49) |
Oct
(63) |
Nov
(46) |
Dec
(7) |
2014 |
Jan
(65) |
Feb
(128) |
Mar
(40) |
Apr
(11) |
May
(4) |
Jun
(8) |
Jul
(16) |
Aug
(11) |
Sep
(4) |
Oct
(1) |
Nov
(5) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(5) |
May
(4) |
Jun
(12) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
(6) |
11
|
12
(1) |
13
(1) |
14
(3) |
15
|
16
(2) |
17
(1) |
18
(3) |
19
|
20
(3) |
21
(9) |
22
(4) |
23
(4) |
24
(4) |
25
(2) |
26
|
27
|
28
(1) |
|
|
|
|
|
From: xiong w. <wan...@gm...> - 2011-02-28 06:15:43
|
Hi Michael, The enclosures are including such files: 1. The patch which fix the bugs about rules you reported. 2. The test cases about mutiple insert. 3. The expect files on insert.sql 4. The test cases on mutiple insert rules. There're bugs on rule in PGXC, therefore I only attached the test cases on rule without relative expect file. Regards, Benny 2011/2/22 Michael Paquier <mic...@gm...>: > Hi, > > Here is a little bit of feedback about the rule crash. > I fixed myself an issue I found with rules this morning. > > So based on that I ran a couple of tests with your patch. > 1) case do nothing: works well > dbt1=# create table aa (a int, b int); > CREATE TABLE > dbt1=# create table bb (a int, b int) distribute by replication; > CREATE TABLE > dbt1=# create rule aa_ins as on insert to aa do instead nothing; > CREATE RULE > dbt1=# insert into aa values (1,2),(2,3); > INSERT 0 0 > dbt1=# select * from bb; > a | b > ---+--- > (0 rows) > dbt1=# select * from aa; > a | b > ---+--- > (0 rows) > This case works well. > > 2) with an insert rule: do also > dbt1=# create table aa (a int, b int); > CREATE TABLE > dbt1=# create table bb (a int, b int) distribute by replication; > CREATE TABLE > dbt1=# create rule bb_ins as on insert to aa do also insert into bb values > (new.a,new.b); > CREATE RULE > dbt1=# insert into aa values (1,2),(2,3); > dbt1=# execute direct on node 1 'select * from aa'; > a | b > ---+--- > 1 | 2 > 1 | 2 > 2 | 3 > 1 | 2 > 2 | 3 > (5 rows) > dbt1=# execute direct on node 2 'select * from aa'; > a | b > ---+--- > 2 | 3 > 1 | 2 > 2 | 3 > 1 | 2 > 2 | 3 > (5 rows) > It looks that the query is not running on the good table. > In RewriteInsertStmt, only one locator information is used when rewriting > the query. > Only the locator information of the tables whose rule is applied to is taken > into account. > > For example, in my case queries are not rewritten for table bb but only for > table aa. > It may be possible to take into account also the table bb defined in the > rules when building the lists of values. > > If the others have any ideas about how it could be able to do that smoothly, > any ideas is welcome. > > I think you should modify RewriteInsertStmt to take into account also the > rules that have been fired on this query. > I suppose this information is visible in the parsing tree as it works well > for one INSERT value. > > I attach a modified version of the patch you sent. > It does exactly the same thing as your first version. > > Regards, > -- > Michael Paquier > http://michaelpq.users.sourceforge.net > > |