forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit03155dc
committed
It seems that SPI_prepare() doesn't work well in some cases.
Pawel Pierscionek [pawel@astercity.net] reported about thefollowing case 1([SQL] drop table in pgsql).Michael Contzen [mcontzen@dohle.com] reported about thefollowing case 2(PL/PGSQL bug using aggregates).You can find it from pgsql-hackers archive.1. PL/pgSQL can't execute UTILITY commands. SPI_prepare() doesn't copy(save) the utilityStmt member of Query type nodes,because copyObject() is not implemented for nodes of (Create/Destroy etc)Stmt type.2. Aggregates in PL/pgSQL cause wrong results.... It's a list including Aggreg type nodes which exist in TargetList(i.e Aggreg type nodes are common to aggs member list and TargetList). AFAIC the common pointer is not copied to the same pointer by copyObject() function. In my patch I reconstruct aggs member node from new(copied) Agg type node. Is it proper to use set_agg_tlist_references() function to reconstruct aggs member node for Agg type nodes ?Thanks.Hiroshi InoueInoue@tpf.co.jp1 parent289a826 commit03155dc
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
509 |
| - | |
| 509 | + | |
510 | 510 |
| |
511 | 511 |
| |
512 | 512 |
| |
|
0 commit comments
Comments
(0)