You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(28) |
Jun
(12) |
Jul
(11) |
Aug
(12) |
Sep
(5) |
Oct
(19) |
Nov
(14) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(18) |
Feb
(30) |
Mar
(115) |
Apr
(89) |
May
(50) |
Jun
(44) |
Jul
(22) |
Aug
(13) |
Sep
(11) |
Oct
(30) |
Nov
(28) |
Dec
(39) |
2012 |
Jan
(38) |
Feb
(18) |
Mar
(43) |
Apr
(91) |
May
(108) |
Jun
(46) |
Jul
(37) |
Aug
(44) |
Sep
(33) |
Oct
(29) |
Nov
(36) |
Dec
(15) |
2013 |
Jan
(35) |
Feb
(611) |
Mar
(5) |
Apr
(55) |
May
(30) |
Jun
(28) |
Jul
(458) |
Aug
(34) |
Sep
(9) |
Oct
(39) |
Nov
(22) |
Dec
(32) |
2014 |
Jan
(16) |
Feb
(16) |
Mar
(42) |
Apr
(179) |
May
(7) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(4) |
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(2) |
2
(3) |
3
|
4
|
5
|
6
(2) |
7
(1) |
8
|
9
(4) |
10
|
11
|
12
|
13
|
14
(1) |
15
(1) |
16
(1) |
17
|
18
|
19
|
20
|
21
(1) |
22
|
23
|
24
(2) |
25
|
26
|
27
(2) |
28
(1) |
29
(1) |
30
(22) |
|
|
From: Michael P. <mic...@us...> - 2011-06-30 04:43:08
|
Project "website". The branch, master has been updated via 840b5e1950e29ef18adf871df493b2c17885bc84 (commit) from 0d458b46802e6e5e9035b37672dffe5a609a81c9 (commit) - Log ----------------------------------------------------------------- commit 840b5e1950e29ef18adf871df493b2c17885bc84 Author: Michael P <mic...@us...> Date: Thu Jun 30 13:45:08 2011 +0900 Update of website coming with 0.9.5 diff --git a/download.html b/download.html index bc83d13..dc6b9ab 100755 --- a/download.html +++ b/download.html @@ -36,20 +36,33 @@ the project download page. Please also note tarball files do not include Postgres-XC documents. </p> -<!-- Documents of version 0.9.4 --> +<!-- Documents of version 0.9.5 --> <h4> -Version 0.9.4 +Version 0.9.5 </h4> <p> <ul> -<!-- tarball of 0.9.4, main download--> +<!-- tarball of 0.9.5, main download--> <li> -<code>pgxc_v0.9.4.tar.gz</code>: <br> +<code>pgxc_v0.9.5.tar.gz</code>: <br> Latest version of Postgres-XC available.<br> Please note that Postgres-XC documentation is not included in this file. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/pgxc_v0_9_4.tar.gz/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/pgxc_v0_9_5.tar.gz/download" target="_blank"> +(download) +</a> +</li> + +<!-- tarball (diff) --> +<li> +<code>PGXC_v0_9_5-PG_REL9_0_4.patch.gz</code>: <br> +The same material as above, but this file includes only the patch to apply +to the PostgreSQL 9.0.4 release source code.<br> +It is useful if you would like to see just a difference between PostgreSQL and Postgres-XC.<br> +No Postgres-XC documentation is included in this file either. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PGXC_v0_9_5-PG_REL9_0_4.patch.gz/download" target="_blank"> (download) </a> </li> @@ -57,9 +70,9 @@ Please note that Postgres-XC documentation is not included in this file. <!-- License --> <li> <code>COPYING</code>: <br> -License description. Postgres-XC is distributed under LGPL version 2.1 +License description. Postgres-XC is distributed under the PostgreSQL license. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/COPYING/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/COPYING/download" target="_blank"> (download) </a> </li> @@ -67,61 +80,61 @@ License description. Postgres-XC is distributed under LGPL version 2.1 <!-- Files --> <li> <code>FILES</code>: <br> -Description of files included in Postgres-XC 0.9.4 release. +Description of files included in Postgres-XC 0.9.5 release. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/FILES/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/FILES/download" target="_blank"> (download) </a> </li> <!-- Reference Manual --> <li> -<code>PG-XC_ReferenceManual_v0_9_4.pdf</code>: <br> +<code>PG-XC_ReferenceManual_v0_9_5.pdf</code>: <br> Reference of Postgres-XC extension. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_ReferenceManual_v0_9_4.pdf/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PG-XC_ReferenceManual_v0_9_5.pdf/download" target="_blank"> (download) </a> </li> <!-- pgbench Tutorial Manual --> <li> -<code>PG-XC_pgbench_Tutorial_v0_9_4.pdf</code>: <br> +<code>PG-XC_pgbench_Tutorial_v0_9_5.pdf</code>: <br> Step by step description how to build and configure pgbench to run with Postgres-XC. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_pgbench_Tutorial_v0_9_4.pdf/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PG-XC_pgbench_Tutorial_v0_9_5.pdf/download" target="_blank"> (download) </a> </li> <!-- DBT-1 Tutorial Manual --> <li> -<code>PG-XC_DBT1_Tutorial_v0_9_4.pdf</code>: <br> +<code>PG-XC_DBT1_Tutorial_v0_9_5.pdf</code>: <br> Step by step description how to build and configure DBT-1 to run with Postgres-XC. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_DBT1_Tutorial_v0_9_4.pdf/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PG-XC_DBT1_Tutorial_v0_9_5.pdf/download" target="_blank"> (download) </a> </li> <!-- Install Manual --> <li> -<code>PG-XC_InstallManual_v0_9_4.pdf</code>: <br> +<code>PG-XC_InstallManual_v0_9_5.pdf</code>: <br> Step by step description how to build, install and configure Postgres-XC. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_InstallManual_v0_9_4.pdf/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PG-XC_InstallManual_v0_9_5.pdf/download" target="_blank"> (download) </a> </li> <!-- SQL limitation manual --> <li> -<code>PG-XC_SQL_Limitations_v0_9_4.pdf</code>: <br> -SQL restrictions available for Postgres-XC 0.9.4. +<code>PG-XC_SQL_Limitations_v0_9_5.pdf</code>: <br> +SQL restrictions available for Postgres-XC 0.9.5. ⇒ -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_SQL_Limitations_v0_9_4.pdf/download" target="_blank"> +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PG-XC_SQL_Limitations_v0_9_5.pdf/download" target="_blank"> (download) </a> </li> diff --git a/events.html b/events.html index 4bd7009..54715ee 100755 --- a/events.html +++ b/events.html @@ -15,7 +15,7 @@ <p class="plain"> A lot of opportunities to meet the Core developers!! <ul> -<li>PgCon 2011 in May 2011</li> +<li>Currently applied for Postgres Open 2011 hold in Sept in Chicago</li> </ul> </p> @@ -33,10 +33,10 @@ Description of this event. UPDATES --> <h2 class="plain">Updates</h2> -<!-- Postgres-XC 0.9.4 download --> +<!-- Postgres-XC 0.9.5 download --> <p class="plain"> -Postgres-XC 0.9.4 is now available!! Download -<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/pgxc_v0_9_4.tar.gz/download" target="_blank"> +Postgres-XC 0.9.5 is now available!! Download +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/pgxc_v0_9_5.tar.gz/download" target="_blank"> here. </a> </p> diff --git a/links.html b/links.html index c957e18..296b6e4 100755 --- a/links.html +++ b/links.html @@ -34,6 +34,11 @@ EnterpriseDB === Major Links === --> <h2 class="plain">Links</h2> +<!-- Postgres-XC project Wiki --> +<p class="plain"> +<a href="https://sourceforge.net/apps/mediawiki/postgres-xc/index.php?title=Main_Page" target="_blank"> +Postgres-XC project Wiki +</p> <!-- Postgres-XC in PG wiki --> <p class="plain"> <a href="http://www.pgcon.org/2010/schedule/events/226.en.html" target="_blank"> @@ -44,7 +49,7 @@ Postgres-XC Presentation in PGCon2010 Postgres-XC in Postgres Wiki </a> </p> -<!-- PostgreSQL CLuster Page --> +<!-- PostgreSQL Cluster Page --> <p class="plain"> <a href="http://wiki.postgresql.org/wiki/Replication%2C_Clustering%2C_and_Connection_Pooling" target="_blank"> PostgreSQL Clustering Projects diff --git a/prev_vers/version0_9.html b/prev_vers/version0_9.html index 4c7e3fb..de0c4b2 100644 --- a/prev_vers/version0_9.html +++ b/prev_vers/version0_9.html @@ -232,14 +232,9 @@ Description of the outline of Postgres-XC internals. (download) </a> </li> - </ul> </p> -</body> -</html> - - <!-- Documents of version 0.9.2 --> <h4> Version 0.9.2 @@ -353,7 +348,8 @@ Description of the outline of Postgres-XC internals. (download) </a> </li> - +</ul> +</p> <!-- Documents of version 0.9.3 --> <h4> Version 0.9.3 @@ -475,8 +471,101 @@ Postgres-XC configurator. Written in Ruby and recommended to set up easily a Pos (download) </a> </li> +</ul> +</p> + +<!-- Documents of version 0.9.4 --> +<h4> +Version 0.9.4 +</h4> + +<p> +<ul> +<!-- tarball of 0.9.4, main download--> +<li> +<code>pgxc_v0.9.4.tar.gz</code>: <br> +Latest version of Postgres-XC available.<br> +Please note that Postgres-XC documentation is not included in this file. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/pgxc_v0_9_4.tar.gz/download" target="_blank"> +(download) +</a> +</li> + +<!-- License --> +<li> +<code>COPYING</code>: <br> +License description. Postgres-XC is distributed under LGPL version 2.1 +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/COPYING/download" target="_blank"> +(download) +</a> +</li> + +<!-- Files --> +<li> +<code>FILES</code>: <br> +Description of files included in Postgres-XC 0.9.4 release. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/FILES/download" target="_blank"> +(download) +</a> +</li> + +<!-- Reference Manual --> +<li> +<code>PG-XC_ReferenceManual_v0_9_4.pdf</code>: <br> +Reference of Postgres-XC extension. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_ReferenceManual_v0_9_4.pdf/download" target="_blank"> +(download) +</a> +</li> +<!-- pgbench Tutorial Manual --> +<li> +<code>PG-XC_pgbench_Tutorial_v0_9_4.pdf</code>: <br> +Step by step description how to build and configure pgbench to run with +Postgres-XC. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_pgbench_Tutorial_v0_9_4.pdf/download" target="_blank"> +(download) +</a> +</li> +<!-- DBT-1 Tutorial Manual --> +<li> +<code>PG-XC_DBT1_Tutorial_v0_9_4.pdf</code>: <br> +Step by step description how to build and configure DBT-1 to run with +Postgres-XC. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_DBT1_Tutorial_v0_9_4.pdf/download" target="_blank"> +(download) +</a> +</li> + +<!-- Install Manual --> +<li> +<code>PG-XC_InstallManual_v0_9_4.pdf</code>: <br> +Step by step description how to build, install and configure Postgres-XC. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_InstallManual_v0_9_4.pdf/download" target="_blank"> +(download) +</a> +</li> + +<!-- SQL limitation manual --> +<li> +<code>PG-XC_SQL_Limitations_v0_9_4.pdf</code>: <br> +SQL restrictions available for Postgres-XC 0.9.4. +⇒ +<a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_SQL_Limitations_v0_9_4.pdf/download" target="_blank"> +(download) +</a> +</li> </ul> </p> + +</body> +</html> diff --git a/roadmap.html b/roadmap.html index 3ab431d..222e16b 100755 --- a/roadmap.html +++ b/roadmap.html @@ -33,27 +33,36 @@ similar to PostgreSQL, except for savepoints. </p> <p> On the other hand, Postgres-XC needs to enhance support for general statements.<br /> -As of Version 0.9.4, Postgres-XC supports statements which can be executed +As of Version 0.9.5, Postgres-XC supports statements which can be executed on a single data node, or on multiple nodes for single and multi step.<br /> This new version adds support for:<br /> <ul> +<li>License changes to PostgreSQL license</li> +<li>PITR and barrier mechanism (create consistent recovery points in a cluster of nodes)</li> +<li>GTM standby</li> +<li>GROUP BY</li> +<li>Single-step PL/PGSQL function support</li> +<li>ROLE DDL, REVOKE, GRANT, etc.</li> +<li>Connection pooling supports multiple users</li> +<li>Session parameters</li> +<li>Improvement of aggregates</li> +<li>New types of distribution keys for table distribution</li> +<li>Cluster setting simplified</li> +<li>GTM proxy reconnection</li> +<li>Merge with PostgreSQL 9.0.4</li> <li>pg_regress</li> -<li>Merge with PostgreSQL 9.0.3</li> -<li>Pooler connection clean-up with CLEAN CONNECTION</li> -<li>EXECUTE DIRECT support, launch queries directly on target nodes!</li> -<li>INSERT SELECT basic support</li> -<li>IMMEDIATE constraints</li> -<li>Code stabilization (No crash, no freeze whatver the query) and a loooot of bugs fixed!</li> +<li>DBT-1 stabilization</li> +<li>More code stabilization</li> </ul> -However there are some limitations please refer to <a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.4/PG-XC_SQL_Limitations_v0_9_4.pdf/download" target="_blank"> +However there are some limitations please refer to <a href="https://sourceforge.net/projects/postgres-xc/files/Version_0.9.5/PG-XC_SQL_Limitations_v0_9_5.pdf/download" target="_blank"> SQL Limitations </a> document for further details. </p> <p> There is no support yet for <code>SELECT</code> in <code>FROM</code> clause. </p> -<p>We will be expanding the coverage of supported SQL, stabilization and High-Availability (HA) features in the coming months.</p> +<p>In the next months, we will expand HA features with GTM standby improvement and synchronous streaming replication. Another focus is the support of multi-prepared statements or complicated statements such as subqueries, SELECT INTO, etc.</p> <!-- ==== Planned feature === --> <h3> Upcoming Releases and Features @@ -85,37 +94,24 @@ subqueries<br> <!-- ==== For Version 1.0 ==== --> <h4> -Version 0.9.5 (June, 2011) +Version 0.9.6 (September, 2011) </h4> <p class="inner"> <ul> -<li>License modified from LGPL to BSD</li> -<li>SQL/plpgsql functions</li> -<li>GROUP BY</li> -<li>CURRENT OF</li> -<li>pg_regress extension</li> -<li>ROLE, GRANT, REVOKE</li> -<li>Pooler for multiple users</li> -<li>Session and local parameters</li> -<li>HA Capability - <ul> - <li>Datanode mirroring functionality: multiple Datanodes seen as only one node,<br /> - SQL-based replication</li> - <li>XC Cluster Manager: manage in an allocated shared memory space node information,<br /> - used to report node failures</li> - <li>XC watcher: Central part managing the XC Cluster.<br /> - It contains commands to start/stop/restart the cluster.<br /> - It is also in charge of gathering and reporting to XCM entities nodes that failed.</li> - </ul> -</li> +<li>GTM standby improvements</li> +<li>HAVING</li> +<li>Extension of synchronous streaming replication</li> +<li>Creation of tables in subset of nodes</li> +<li>Entension of query planning with remote node scan extensions</li> <li>Bug corrections</li> +<li>Performance improvement</li> </ul> </p> <!-- === Beyond Version 1.0 === ---> <h4> -After Version 0.9.5, on the way to Version 1.0 +After Version 0.9.6, on the way to Version 1.0 </h4> <p class="inner"> @@ -132,7 +128,6 @@ After Version 0.9.5, on the way to Version 1.0 <li>More variety of statements</li> <li>GTM-Standby</li> <li>Savepoint</li> -<li>Session Parameters</li> <li>Backward cursor</li> <li>Batch, statement pushdown</li> <li>Global constraints</li> ----------------------------------------------------------------------- Summary of changes: download.html | 53 +++++++++++++++--------- events.html | 8 ++-- links.html | 7 +++- prev_vers/version0_9.html | 101 ++++++++++++++++++++++++++++++++++++++++++--- roadmap.html | 57 ++++++++++++-------------- 5 files changed, 164 insertions(+), 62 deletions(-) hooks/post-receive -- website |
From: Michael P. <mic...@us...> - 2011-06-30 02:08:50
|
Project "Postgres-XC documentation". The branch, master has been updated via d03b1e4e0cd5feb2f2ed142d22139a63b947f4bf (commit) from a4203fc5cb3ed686eeaaf577521add2646e99569 (commit) - Log ----------------------------------------------------------------- commit d03b1e4e0cd5feb2f2ed142d22139a63b947f4bf Author: Michael P <mic...@us...> Date: Thu Jun 30 11:09:53 2011 +0900 Addition of release policy diagram An image produced from this diagram is used in XC's Wiki but MediaWiki does not accept to store open office files, so store it here. diff --git a/release_policy/PG-XC_Release_Policy_Diagram.odg b/release_policy/PG-XC_Release_Policy_Diagram.odg new file mode 100644 index 0000000..1cccea6 Binary files /dev/null and b/release_policy/PG-XC_Release_Policy_Diagram.odg differ ----------------------------------------------------------------------- Summary of changes: release_policy/PG-XC_Release_Policy_Diagram.odg | Bin 0 -> 14105 bytes 1 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 release_policy/PG-XC_Release_Policy_Diagram.odg hooks/post-receive -- Postgres-XC documentation |
From: Michael P. <mic...@us...> - 2011-06-30 01:49:50
|
Project "Postgres-XC documentation". The annotated tag, XC0_9_5_PG9_0 has been created at bf29916bf7b05a8bc293049f4bd1738387e0e955 (tag) tagging a4203fc5cb3ed686eeaaf577521add2646e99569 (commit) replaces XC0_9_4_PG9_0 tagged by Michael P on Thu Jun 30 10:51:00 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC documentation version 0.9.5 tag Koichi Suzuki (1): This commit adds one administartion file as below. Michael P (3): Correction of install manual and DBT-1 Tutorial for 0.9.5 release Finish review of documents for release 0.9.5 Complete reference manual with CREATE BARRIER ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC documentation |
From: Michael P. <mic...@us...> - 2011-06-30 01:49:15
|
Project "Postgres-XC documentation". The branch, REL0_9_5_STABLE has been created at a4203fc5cb3ed686eeaaf577521add2646e99569 (commit) - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC documentation |
From: Michael P. <mic...@us...> - 2011-06-30 01:46:56
|
Project "Postgres-XC documentation". The branch, master has been updated via a4203fc5cb3ed686eeaaf577521add2646e99569 (commit) via 6deca16c901340abcee7f5964c3615c01a8104dc (commit) via fd8a3edd5a41ee907ad12a47d6a290150e0a559c (commit) from 85d141426729b3b5089465ff6632741c624edc48 (commit) - Log ----------------------------------------------------------------- commit a4203fc5cb3ed686eeaaf577521add2646e99569 Author: Michael P <mic...@us...> Date: Mon Jun 27 14:38:35 2011 +0900 Complete reference manual with CREATE BARRIER diff --git a/PG-XC_ReferenceManual.odt b/PG-XC_ReferenceManual.odt index 082350c..847d824 100644 Binary files a/PG-XC_ReferenceManual.odt and b/PG-XC_ReferenceManual.odt differ commit 6deca16c901340abcee7f5964c3615c01a8104dc Author: Michael P <mic...@us...> Date: Thu Jun 23 15:16:35 2011 +0900 Finish review of documents for release 0.9.5 diff --git a/PG-XC_InstallManual.odt b/PG-XC_InstallManual.odt index a437d15..bd4060b 100644 Binary files a/PG-XC_InstallManual.odt and b/PG-XC_InstallManual.odt differ diff --git a/PG-XC_ReferenceManual.odt b/PG-XC_ReferenceManual.odt index 7288a56..082350c 100644 Binary files a/PG-XC_ReferenceManual.odt and b/PG-XC_ReferenceManual.odt differ diff --git a/PG-XC_SQL_Limitations.odt b/PG-XC_SQL_Limitations.odt index 45d3928..f9187c4 100644 Binary files a/PG-XC_SQL_Limitations.odt and b/PG-XC_SQL_Limitations.odt differ diff --git a/PG-XC_pgbench_Tutorial.odt b/PG-XC_pgbench_Tutorial.odt index a537e23..1fdbe20 100644 Binary files a/PG-XC_pgbench_Tutorial.odt and b/PG-XC_pgbench_Tutorial.odt differ commit fd8a3edd5a41ee907ad12a47d6a290150e0a559c Author: Michael P <mic...@us...> Date: Thu Jun 23 14:23:42 2011 +0900 Correction of install manual and DBT-1 Tutorial for 0.9.5 release diff --git a/PG-XC_DBT1_Tutorial.odt b/PG-XC_DBT1_Tutorial.odt index 9e413a4..e21783a 100644 Binary files a/PG-XC_DBT1_Tutorial.odt and b/PG-XC_DBT1_Tutorial.odt differ diff --git a/PG-XC_InstallManual.odt b/PG-XC_InstallManual.odt index fca6f9f..a437d15 100644 Binary files a/PG-XC_InstallManual.odt and b/PG-XC_InstallManual.odt differ diff --git a/PG-XC_InstallManual_Diagram.jpg b/PG-XC_InstallManual_Diagram.jpg new file mode 100644 index 0000000..5310894 Binary files /dev/null and b/PG-XC_InstallManual_Diagram.jpg differ diff --git a/PG-XC_InstallManual_Diagram.odg b/PG-XC_InstallManual_Diagram.odg new file mode 100644 index 0000000..3b81893 Binary files /dev/null and b/PG-XC_InstallManual_Diagram.odg differ ----------------------------------------------------------------------- Summary of changes: PG-XC_DBT1_Tutorial.odt | Bin 35088 -> 35081 bytes PG-XC_InstallManual.odt | Bin 47031 -> 170328 bytes PG-XC_InstallManual_Diagram.jpg | Bin 0 -> 128637 bytes PG-XC_InstallManual_Diagram.odg | Bin 0 -> 23726 bytes PG-XC_ReferenceManual.odt | Bin 38825 -> 39964 bytes PG-XC_SQL_Limitations.odt | Bin 29658 -> 29592 bytes PG-XC_pgbench_Tutorial.odt | Bin 19214 -> 19107 bytes 7 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 PG-XC_InstallManual_Diagram.jpg create mode 100644 PG-XC_InstallManual_Diagram.odg hooks/post-receive -- Postgres-XC documentation |
From: Michael P. <mic...@us...> - 2011-06-30 01:31:40
|
Project "Postgres-XC documentation". The annotated tag, v0.9.4 has been deleted was 3839d061ae141d52651f7c00367638bbbeed74e7 ----------------------------------------------------------------------- tag v0.9.4 Postgres-XC version 0.9.4 tag 87e4cff06ed2bd2871ae0a35189e7b633343d6d2 Correction of documentation and manuals for release 0.9.4 ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC documentation |
From: Michael P. <mic...@us...> - 2011-06-30 01:29:10
|
Project "Postgres-XC documentation". The annotated tag, XC0_9_4_PG9_0 has been created at 9d802a4bc83d915d795504657ca00cec818cb7df (tag) tagging 87e4cff06ed2bd2871ae0a35189e7b633343d6d2 (commit) tagged by Michael P on Thu Jun 30 10:31:10 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC documentation version 0.9.4 tag Koichi Suzuki (4): This is the first commit of Postgres-XC document. Until Postgres-XC 0.9.3, Added new directory for progress reporting document, "progress". 1. Added 2011FYQ1 schedule for each member. Changed Koichi's schedule for May and June. Michael P (1): Correction of documentation and manuals for release 0.9.4 ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC documentation |
From: Michael P. <mic...@us...> - 2011-06-30 01:21:54
|
Project "Postgres-XC". The annotated tag, v0.9.4 has been deleted was 3ac5a29e291e47af2ba420685c6776012a26779c ----------------------------------------------------------------------- tag v0.9.4 Postgres-XC version 0.9.4 tag 46f524e5a6430735c6549afbbe0ea61ab8a4cd49 Fix GXID feed issue ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:21:36
|
Project "Postgres-XC". The annotated tag, v0.9.3 has been deleted was 4fa8496749b9d27ca702facbc78df9a45f6cda9c ----------------------------------------------------------------------- tag v0.9.3 Postgres-XC version 0.9.3 tag d7d492eaeca181add193b4705de58637f5ba7c58 Deletion of a DEBUG message in postmaster.c ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:21:15
|
Project "Postgres-XC". The annotated tag, v0.9.2 has been deleted was 7402b46760f3fd0d140fd177edfecaae31ec058b ----------------------------------------------------------------------- tag v0.9.2 Postgres-XC version 0.9.2 tag d7ca431066efe320107581186ab853b28fa5f7a7 Support for cold synchronization of catalog table of coordinator. ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:20:57
|
Project "Postgres-XC". The annotated tag, v0.9.1 has been deleted was 560b29899b6391982ee819a82794763adbe234a5 ----------------------------------------------------------------------- tag v0.9.1 Postgres-XC version 0.9.1 tag c2e5a081606b4dfaaa55e45a76d680b55b6bbc15 Fix assertion failure so that \d commands with psql work. ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:19:59
|
Project "Postgres-XC". The annotated tag, v0.9 has been deleted was 8a31b74d08abd0d35c10938e530a34c13cc21d97 ----------------------------------------------------------------------- tag v0.9 Postgres-XC version 0.9 tag 1b726dd39062cfd7648883b0e49a4672194c5963 Postgres-XC version 0.9 ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:18:47
|
Project "Postgres-XC". The annotated tag, XC0_9_3_PG8_4 has been created at bbc818692cb7970691be3d88f8aa6b1ef49dac61 (tag) tagging d7d492eaeca181add193b4705de58637f5ba7c58 (commit) replaces XC0_9_2_PG8_4 tagged by Michael P on Thu Jun 30 10:18:37 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9.3 tag, based on PostgreSQL 8.4 M S (2): Portal integration changes. Initial support for multi-step queries, including cross-node joins. Mason S (2): Added more handling to deal with data node connection failures. There is a race condition that could lead to problems Mason Sharp (13): In Postgres-XC, when extedngin the clog the status assertion Fix a visibility warning due to not taking into account Fixed a bug in GTM introduced with timestamp piggybacking with GXID. Fix a bug with AVG() Improved error handling. Address performance issues that were introduced in the last Initial support for cursors (DECLARE, FETCH). Handle stored functions in queries. Fix a bug with EXPLAIN and EXPLAIN VERBOSE. Fixed bug where extra materialization nodes were being created. Fix bug with pooler. SourceForge Bug ID: 3076224 checkpoint command causes seg fault When there is a data node crash, sometimes we were trying to read Michael P (6): Correction of bugs in pgxc_ddl Support for Global timestamp in Postgres-XC. Implementation of 2PC from applications Added support for two new pieces of functionality. After a Commit of prepared transaction on GTM, Deletion of a DEBUG message in postmaster.c ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:18:19
|
Project "Postgres-XC". The annotated tag, XC0_9_2_PG8_4 has been created at e76a0f1bcc3fb8e79dbe277c8ad91ae8cfc29ba1 (tag) tagging d7ca431066efe320107581186ab853b28fa5f7a7 (commit) replaces XC0_9_1_PG8_4 tagged by Michael P on Thu Jun 30 10:18:29 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9.2 tag, based on PostgreSQL 8.4 Andrei Martsinchyk (4): Reverted PANIC ereports back to ERROR Use ereport instead of Assert if sort operation is not defined If expressions should be added to ORDER BY clause of the step query Fixed a bug when searching terminating semicolon. Mason S (15): Fixed a bug when using a table after it had been created in the same Minor change that updates COPY so that it knows ahead Add support for immutable stored functions and enable support Support for pg_dump and pg_restore. Add support for views. When using hash distributed tables and a value that corresponds to Do not allow WITH RECURSIVE or windowing functions until Do not yet allow creation of temp tables until we properly handle them. Handle more types of queries to determine whether or not they Allow rules to be created, provided that they do not use NOTIFY, Fixed assertion Add support for ORDER BY adn DISTINCT. Changed some error messages so that they will not be duplicates In Postgres-XC, the error stack may overflow because Fix a crash that may occur within the pooler when a Michael P (3): Remove an unnecessary file for the repository. Support for RENAME/DROP SCHEMA with sequences Support for cold synchronization of catalog table of coordinator. Pavan Deolasee (3): Add support for ALTER Sequence. Michael Paquier with some editorilization from Pavan Deolasee Add a missing include file from the previous commit Handling ALTER SEQUENCE at the GTM proxy as well. Michael Paquier. ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:17:54
|
Project "Postgres-XC". The annotated tag, XC0_9_1_PG8_4 has been created at d7fdbb946da0d237e3fb18a18657e6a116319249 (tag) tagging c2e5a081606b4dfaaa55e45a76d680b55b6bbc15 (commit) replaces XC0_9_PG8_4 tagged by Michael P on Thu Jun 30 10:18:21 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9.1 tag, based on PostgreSQL 8.4 Mason S (12): Removed ifdefed code for USE_SSL in GTM, since it is currently For writes to replicated tables, use primary copy technique to reduce Improved error handling. Added support for COPY FROM, for loading tables. Added support for COPY TO a file or STDOUT. Modified pgbench for Postgres-XC. This is the first of some planned changes to recognize more "Postgres-XC safe" Added support for basic aggregate handling. Fixed a bug where if many errors occur we run out of on_proc_exit slots. By default have configure set CFLAGS to use -DPGXC, which is required Fix some assertion failures. Fix assertion failure so that \d commands with psql work. Pavan Deolasee (2): Fix some stylistic issues with the code. Trying to make it more Fix an assertion failure in the GTM code. We were mistakenly overwriting an ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:17:29
|
Project "Postgres-XC". The annotated tag, XC0_9_PG8_4 has been created at 9c01f4c9eb2a1beb7ed0bea8313f2c218d264a1c (tag) tagging 1b726dd39062cfd7648883b0e49a4672194c5963 (commit) tagged by Michael P on Thu Jun 30 10:17:39 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9 tag, based on PostgreSQL 8.4 Michael P (2): PostgreSQL version 8.4.3 Postgres-XC version 0.9 ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:13:52
|
Project "Postgres-XC". The annotated tag, XC0_9_4_PG9_0 has been created at 5bd22bf9c308da6aafa49980687b00197e4e742f (tag) tagging 46f524e5a6430735c6549afbbe0ea61ab8a4cd49 (commit) replaces v0.9.3 tagged by Michael P on Thu Jun 30 10:08:50 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9.4 tag, based on PostgreSQL 9.0 Abbas (16): Block creation of concurrent indices To avoid a crash caused by an insert select statement in vacuum.sql To fix a server crash in aggregates as reported in ID 3125430 GetRelationLocInfo can return NULL, this patch adds check for a NULL return at missing places Block FK Constraints and add some missing checks The test case portals finds a NULL connecction in ExecEndRemoteQuery and crashes the server. This patch puts a NULL check to avoid the crash Fixing a few expected output files and changed a warning message to make the output independent of the cluster configuration Add alternate expected output files to take care of regression failures Expected output changed to fix regression failure Add alternate expected output file to fix regression falilure of numeric.sql Fix for server crash 3148037 : does not fix WHERE CURRENT OF, only fixes server crash Fix for server crash as mentioned in bug ID 3170715 Since the creation of unique indices is supposed to fail in XC hence this output is correct This patch fixes a test case in strings.sql This patch fixes the problem in XC that error detail was not being handled. Merge branch 'merge_postgres_9_0_3' of ssh://postgres-xc.git.sourceforge.net/gitroot/postgres-xc/postgres-xc into merge_postgres_9_0_3 Mason Sharp (22): Special hanlding for ANALYZE on the data nodes. Improve performance of "multi-step" queries (an on-going process). Fix bug with primary key in CREATE TABLE statement. Add a message that the RETURNING clause is not yet supported. 1. Support for UPDATE and DELETE WHERE CURRENT OF for Support for COPY SELECT Do not allow the partition column to be updated on hash partitioned Fix some compiler warnings Fix PGXC macro usage Minor cursor changes: Fix for sourceforge.net bug#3013984: Sequence scope Fixed bug where if there are subqueries in the SELECT clause This fixes a couple of issues noticed after the last commit, Add support for INSERT SELECT. Fix a problem when more values are selected than total columns in Fixed a bug with INSERT SELECT when an input value is NULL. Fixed bug in INSERT when omitting a value for the partitioning column. Fixed recently introduced bug with node determination Add support for single-step prepared statements. Added missing #ifdef PGXC Updated regression tests. Block the creation of temp tables until properly supported Michael P (110): Support for CLEAN CONNECTION Block Node Commit on a Datanode. Change Protocol connection between PGXC nodes and GTM/GTM-Proxy. Correction for implicit 2PC Clean up of execRemote.c Improvement of performance with tuple scan Fix for bug 3142311:renaming sequences error Fix for bug 3136262: Improvement of Explicit 2PC error handling Sequence Renaming Node Registering feature Allow only Remote Coordinator to use functionnalities introduced with SQL/MED Fix for partially committed transactions in Implicit 2PC Clean up in Materialize code Fix and Clean up in Executor Base code to support correlated DELETE and UPDATE Support for correlated DELETE for replicated tables The patch implements multiple insert syntax in PGXC. Fix for make -j Fix for bug 3147497 INSERT.. DEFAULT VALUES Fix for replicated tables using multi-INSERT queries. maintenance for 2011, change header files Support for EXECUTE DIRECT CREATE TABLE: new distribution function MODULO Fix for bug 3142430 Fix for bug 3172438: node registration protocol Multiple INSERT support for MODULO tables Fix for bug 3170713: DROP DATABASE wihout cleaning connections Fix for bug 3170708: Default values support for MULTI INSERT Fix for bug 3188711: Fire rules only on Coordinator Block SAVEPOINT because of non-support Fix for bug 3136262: PREPARE information not correctly got Fix for DROP DATABASE Fix for bug 3151626: Support for COPY BINARY Fix for bug 3134395, 3086422, 3136230: 2PC locks Merge with PostgreSQL 9.0.3 Fix for bug 3199029 GTM/GTM-proxy FATAL error handling Merge branch 'master' into merge_postgres_9_0_3 Improve error handling when launching DDL or utilities Merge branch 'master' into merge_postgres_9_0_3 Fix for CREATE INDEX CONCURRENTLY Block PREPARE and EXECUTE for the time being CREATE TABLE default distribution to REPLICATED Change back table defalt type to distributed. Addition of correct output for regress test float4. Fix regression tests for int4 Fix for regression tests float4 Partial fix for regression test float fix Fix for regression test create_table Fix for regression test txid Block trigger as this feature is not supported Partial fix for regression test temp Block FOREIGN constraint creation Block TEMP SEQUENCE and TABLESPACE Fix when transforming a CREATE statement Cleanup of regression files Fix for regression test create_table Fix for regression test returning Fix for regression test inet Block SERIAL sequences Fix for bug 3201711: Sequence view crash Fix for regression test box Fix for bug 3202643: Sequence error Stabilize code for pg_regress tests Fix for bugs 3148479, 3140473: COPY FROM CVS HEADER, COPY TO WITH CSV QUOTE Fix for bug 3141640: non column select Fix for bugs 3124253 and 3202554: Unique remote query node Fix for bug 3205043: pg_dump support for MODULO table Clean up of pgxc_ddl Merge branch 'master' into merge_postgres_9_0_3 Fix for regression test tablespace Fix for regression test point Fix for regression test box Fix for regression test triggers Fix for regression test prepare Fix for regression test case Fix for regression test guc Fix for regression test update Fix for regression test delete Fix for regression test plancache Fix for regression test combocid Fix for regression test copy and point Fix for regression test copyselect Fix for regression test create_misc Fix for regression test create_aggregate Fix for regression test typed_table Fix for regression test sanity_check Fix for regression test select Fix for regression test select_distinct_on Fix for regression test union Fix for regression test transactions Fix for regression test random Fix for regression test hash_index Fix for regression test namespace Fix for regression test portals_p2 Fix for regression test cluster Fix for regression test dependency Fix for regression test rowtypes Fix for regression test returning Fix for regression test select_into Fix for regression test copy2 Fix for regression test truncate Block DEFERRED constraints (DEFERRABLE) Fix for cache lookup bug for type Addition of a check when fetching tuples Fix for regression test create type Fix for regression test privileges Fix for VIEW and SEQUENCE Fix a cache leak WARNING with system cache Fix for bug 3240318: support for lastval Fix GXID feed issue Pavan Deolasee (1): Check for buffer overflow while constructing gtm/gtm_proxy start/stop commands. ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:12:27
|
Project "Postgres-XC". The annotated tag, XC0_9_PG8_4 has been deleted was 7e16a065ef8791a6b07cc2b693b875997d36cdf9 ----------------------------------------------------------------------- tag XC0_9_PG8_4 Postgres-XC version 0.9 tag, based on PostgreSQL 9.0 1b726dd39062cfd7648883b0e49a4672194c5963 Postgres-XC version 0.9 ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:11:54
|
Project "Postgres-XC". The annotated tag, XC0_9_1_PG8_4 has been deleted was 33c75d0006d72de90c0ae079de4aef2c43a5722b ----------------------------------------------------------------------- tag XC0_9_1_PG8_4 Postgres-XC version 0.9.1 tag, based on PostgreSQL 9.0 c2e5a081606b4dfaaa55e45a76d680b55b6bbc15 Fix assertion failure so that \d commands with psql work. ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:10:30
|
Project "Postgres-XC". The annotated tag, XC0_9_1_PG8_4 has been created at 33c75d0006d72de90c0ae079de4aef2c43a5722b (tag) tagging c2e5a081606b4dfaaa55e45a76d680b55b6bbc15 (commit) replaces XC0_9_PG8_4 tagged by Michael P on Thu Jun 30 10:09:45 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9.1 tag, based on PostgreSQL 9.0 Mason S (12): Removed ifdefed code for USE_SSL in GTM, since it is currently For writes to replicated tables, use primary copy technique to reduce Improved error handling. Added support for COPY FROM, for loading tables. Added support for COPY TO a file or STDOUT. Modified pgbench for Postgres-XC. This is the first of some planned changes to recognize more "Postgres-XC safe" Added support for basic aggregate handling. Fixed a bug where if many errors occur we run out of on_proc_exit slots. By default have configure set CFLAGS to use -DPGXC, which is required Fix some assertion failures. Fix assertion failure so that \d commands with psql work. Pavan Deolasee (2): Fix some stylistic issues with the code. Trying to make it more Fix an assertion failure in the GTM code. We were mistakenly overwriting an ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 01:09:40
|
Project "Postgres-XC". The annotated tag, XC0_9_PG8_4 has been created at 7e16a065ef8791a6b07cc2b693b875997d36cdf9 (tag) tagging 1b726dd39062cfd7648883b0e49a4672194c5963 (commit) tagged by Michael P on Thu Jun 30 10:10:00 2011 +0900 - Log ----------------------------------------------------------------- Postgres-XC version 0.9 tag, based on PostgreSQL 9.0 Michael P (2): PostgreSQL version 8.4.3 Postgres-XC version 0.9 ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-30 00:53:05
|
Project "Postgres-XC". The branch, REL0_9_5_STABLE has been created at e992f2cb8debeca4123d3137e48949071342c5c0 (commit) - Log ----------------------------------------------------------------- commit e992f2cb8debeca4123d3137e48949071342c5c0 Merge: 091b0e8 bbfcc71 Author: Michael P <mic...@us...> Date: Thu Jun 30 09:48:18 2011 +0900 Merge remote branch 'postgres/REL9_0_STABLE' into REL0_9_5_STABLE This is the commit of Postgres-XC release 0.9.5. Conflicts: src/backend/commands/vacuum.c src/backend/parser/parse_func.c src/backend/storage/lmgr/proc.c src/backend/utils/init/postinit.c src/include/catalog/catversion.h src/include/catalog/pg_aggregate.h src/include/catalog/pg_proc.h src/include/parser/parse_func.h src/include/storage/procarray.h src/test/regress/expected/.gitignore diff --cc src/backend/commands/vacuum.c index bf1a0ed,5decc5c..b3b9972 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@@ -804,10 -855,6 +873,9 @@@ vacuum_rel(Oid relid, VacuumStmt *vacst int save_sec_context; int save_nestlevel; - if (scanned_all) - *scanned_all = false; +#ifndef PGXC + /* In PG-XC, do these after setting vacuum flags */ ++ /* Begin a transaction for vacuuming this relation */ StartTransactionCommand(); diff --cc src/backend/nodes/copyfuncs.c index 363a548,778c530..936f2b1 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@@ -13,22 -13,18 +13,23 @@@ * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California + * Portions Copyright (c) 2010-2011 Nippon Telegraph and Telephone Corporation * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.464 2010/02/26 02:00:43 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.464.4.2 2010/08/18 18:35:30 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" + #include "miscadmin.h" #include "nodes/plannodes.h" #include "nodes/relation.h" +#ifdef PGXC +#include "pgxc/locator.h" +#include "pgxc/planner.h" +#endif #include "utils/datum.h" diff --cc src/backend/nodes/equalfuncs.c index 1f6ac2d,6e00584..b061c35 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@@ -20,10 -20,9 +20,10 @@@ * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California + * Portions Copyright (c) 2010-2011 Nippon Telegraph and Telephone Corporation * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.385 2010/02/26 02:00:43 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.385.4.1 2010/08/18 18:35:30 tgl Exp $ * *------------------------------------------------------------------------- */ diff --cc src/backend/parser/parse_expr.c index 286eb59,a0cfad0..4cab90c --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@@ -1225,123 -1220,18 +1220,42 @@@ transformFuncCall(ParseState *pstate, F } /* ... and hand off to ParseFuncOrColumn */ - result = ParseFuncOrColumn(pstate, - fn->funcname, - targs, - fn->agg_order, - fn->agg_star, - fn->agg_distinct, - fn->func_variadic, - fn->over, - false, - fn->location); - - /* - * pg_get_expr() is a system function that exposes the expression - * deparsing functionality in ruleutils.c to users. Very handy, but it was - * later realized that the functions in ruleutils.c don't check the input - * rigorously, assuming it to come from system catalogs and to therefore - * be valid. That makes it easy for a user to crash the backend by passing - * a maliciously crafted string representation of an expression to - * pg_get_expr(). - * - * There's a lot of code in ruleutils.c, so it's not feasible to add - * water-proof input checking after the fact. Even if we did it once, it - * would need to be taken into account in any future patches too. - * - * Instead, we restrict pg_rule_expr() to only allow input from system - * catalogs instead. This is a hack, but it's the most robust and easiest - * to backpatch way of plugging the vulnerability. - * - * This is transparent to the typical usage pattern of - * "pg_get_expr(systemcolumn, ...)", but will break "pg_get_expr('foo', - * ...)", even if 'foo' is a valid expression fetched earlier from a - * system catalog. Hopefully there's isn't many clients doing that out - * there. - */ - if (result && IsA(result, FuncExpr) &&!superuser()) - { - FuncExpr *fe = (FuncExpr *) result; - - if (fe->funcid == F_PG_GET_EXPR || fe->funcid == F_PG_GET_EXPR_EXT) - { - Expr *arg = linitial(fe->args); - bool allowed = false; - - /* - * Check that the argument came directly from one of the allowed - * system catalog columns - */ - if (IsA(arg, Var)) - { - Var *var = (Var *) arg; - RangeTblEntry *rte; - - rte = GetRTEByRangeTablePosn(pstate, - var->varno, var->varlevelsup); - - switch (rte->relid) - { - case IndexRelationId: - if (var->varattno == Anum_pg_index_indexprs || - var->varattno == Anum_pg_index_indpred) - allowed = true; - break; - - case AttrDefaultRelationId: - if (var->varattno == Anum_pg_attrdef_adbin) - allowed = true; - break; - - case ProcedureRelationId: - if (var->varattno == Anum_pg_proc_proargdefaults) - allowed = true; - break; - - case ConstraintRelationId: - if (var->varattno == Anum_pg_constraint_conbin) - allowed = true; - break; - - case TypeRelationId: - if (var->varattno == Anum_pg_type_typdefaultbin) - allowed = true; - break; - } - } - if (!allowed) - ereport(ERROR, - (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("argument to pg_get_expr() must come from system catalogs"))); - } - } - return result; + return ParseFuncOrColumn(pstate, + fn->funcname, + targs, + fn->agg_order, + fn->agg_star, + fn->agg_distinct, + fn->func_variadic, + fn->over, + false, + fn->location); } +#ifdef PGXC +/* + * IsFuncImmutable + * + * Check if given function is immutable or not + * based on the function name and on its arguments + */ +bool +IsFuncImmutable(ParseState *pstate, FuncCall *fn) +{ + ListCell *args; + List *targs = NIL; + + /* Transform list of arguments */ + foreach(args, fn->args) + { + targs = lappend(targs, transformExpr(pstate, + (Node *) lfirst(args))); + } + + return IsParseFuncImmutable(pstate, targs, fn->funcname, fn->func_variadic); +} +#endif + static Node * transformCaseExpr(ParseState *pstate, CaseExpr *c) { diff --cc src/backend/parser/parse_func.c index 99ecd14,25e42b3..8d83f4a --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@@ -1582,98 -1604,135 +1604,231 @@@ LookupAggNameTypeNames(List *aggname, L } + /* + * pg_get_expr() is a system function that exposes the expression + * deparsing functionality in ruleutils.c to users. Very handy, but it was + * later realized that the functions in ruleutils.c don't check the input + * rigorously, assuming it to come from system catalogs and to therefore + * be valid. That makes it easy for a user to crash the backend by passing + * a maliciously crafted string representation of an expression to + * pg_get_expr(). + * + * There's a lot of code in ruleutils.c, so it's not feasible to add + * water-proof input checking after the fact. Even if we did it once, it + * would need to be taken into account in any future patches too. + * + * Instead, we restrict pg_rule_expr() to only allow input from system + * catalogs. This is a hack, but it's the most robust and easiest + * to backpatch way of plugging the vulnerability. + * + * This is transparent to the typical usage pattern of + * "pg_get_expr(systemcolumn, ...)", but will break "pg_get_expr('foo', + * ...)", even if 'foo' is a valid expression fetched earlier from a + * system catalog. Hopefully there aren't many clients doing that out there. + */ + void + check_pg_get_expr_args(ParseState *pstate, Oid fnoid, List *args) + { + Node *arg; + + /* if not being called for pg_get_expr, do nothing */ + if (fnoid != F_PG_GET_EXPR && fnoid != F_PG_GET_EXPR_EXT) + return; + + /* superusers are allowed to call it anyway (dubious) */ + if (superuser()) + return; + + /* + * The first argument must be a Var referencing one of the allowed + * system-catalog columns. It could be a join alias Var or subquery + * reference Var, though, so we need a recursive subroutine to chase + * through those possibilities. + */ + Assert(list_length(args) > 1); + arg = (Node *) linitial(args); + + if (!check_pg_get_expr_arg(pstate, arg, 0)) + ereport(ERROR, + (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), + errmsg("argument to pg_get_expr() must come from system catalogs"))); + } + + static bool + check_pg_get_expr_arg(ParseState *pstate, Node *arg, int netlevelsup) + { + if (arg && IsA(arg, Var)) + { + Var *var = (Var *) arg; + RangeTblEntry *rte; + AttrNumber attnum; + + netlevelsup += var->varlevelsup; + rte = GetRTEByRangeTablePosn(pstate, var->varno, netlevelsup); + attnum = var->varattno; + + if (rte->rtekind == RTE_JOIN) + { + /* Recursively examine join alias variable */ + if (attnum > 0 && + attnum <= list_length(rte->joinaliasvars)) + { + arg = (Node *) list_nth(rte->joinaliasvars, attnum - 1); + return check_pg_get_expr_arg(pstate, arg, netlevelsup); + } + } + else if (rte->rtekind == RTE_SUBQUERY) + { + /* Subselect-in-FROM: examine sub-select's output expr */ + TargetEntry *ste = get_tle_by_resno(rte->subquery->targetList, + attnum); + ParseState mypstate; + + if (ste == NULL || ste->resjunk) + elog(ERROR, "subquery %s does not have attribute %d", + rte->eref->aliasname, attnum); + arg = (Node *) ste->expr; + + /* + * Recurse into the sub-select to see what its expr refers to. + * We have to build an additional level of ParseState to keep in + * step with varlevelsup in the subselect. + */ + MemSet(&mypstate, 0, sizeof(mypstate)); + mypstate.parentParseState = pstate; + mypstate.p_rtable = rte->subquery->rtable; + /* don't bother filling the rest of the fake pstate */ + + return check_pg_get_expr_arg(&mypstate, arg, 0); + } + else if (rte->rtekind == RTE_RELATION) + { + switch (rte->relid) + { + case IndexRelationId: + if (attnum == Anum_pg_index_indexprs || + attnum == Anum_pg_index_indpred) + return true; + break; + + case AttrDefaultRelationId: + if (attnum == Anum_pg_attrdef_adbin) + return true; + break; + + case ProcedureRelationId: + if (attnum == Anum_pg_proc_proargdefaults) + return true; + break; + + case ConstraintRelationId: + if (attnum == Anum_pg_constraint_conbin) + return true; + break; + + case TypeRelationId: + if (attnum == Anum_pg_type_typdefaultbin) + return true; + break; + } + } + } + + return false; + } ++ ++ +#ifdef PGXC +/* + * IsParseFuncImmutable + * + * Check if given function is immutable or not + * based on the function name and on its arguments + * This functionnality will be extended to support functions in constraints + */ +bool +IsParseFuncImmutable(ParseState *pstate, List *targs, List *funcname, bool func_variadic) +{ + ListCell *l; + ListCell *nextl; + FuncDetailCode fdresult; + Oid actual_arg_types[FUNC_MAX_ARGS]; + List *argnames; + int nargs; + /* Return results */ + Oid funcid, rettype; + Oid *declared_arg_types; + bool retset; + int nvargs; + List *argdefaults; + + /* Get detailed argument information */ + nargs = 0; + for (l = list_head(targs); l != NULL; l = nextl) + { + Node *arg = lfirst(l); + Oid argtype = exprType(arg); + + nextl = lnext(l); + + if (argtype == VOIDOID && IsA(arg, Param)) + { + targs = list_delete_ptr(targs, arg); + continue; + } + actual_arg_types[nargs++] = argtype; + } + argnames = NIL; + + foreach(l, targs) + { + Node *arg = lfirst(l); + + if (IsA(arg, NamedArgExpr)) + { + NamedArgExpr *na = (NamedArgExpr *) arg; + ListCell *lc; + + /* Reject duplicate arg names */ + foreach(lc, argnames) + { + if (strcmp(na->name, (char *) lfirst(lc)) == 0) + ereport(ERROR, + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("argument name \"%s\" used more than once", + na->name), + parser_errposition(pstate, na->location))); + } + argnames = lappend(argnames, na->name); + } + else + { + if (argnames != NIL) + ereport(ERROR, + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("positional argument cannot follow named argument"), + parser_errposition(pstate, exprLocation(arg)))); + } + } + + fdresult = func_get_detail(funcname, + targs, + argnames, + nargs, + actual_arg_types, + !func_variadic, + true, + &funcid, &rettype, &retset, &nvargs, + &declared_arg_types, &argdefaults); + + /* + * Now only the function ID is used to check if function is immutable or not, + * but for function support in DEFAULT values, this function can be easily extended + * for other analysis purposes. + */ + if (func_volatile(funcid) == PROVOLATILE_IMMUTABLE) + return true; + else + return false; +} +#endif - diff --cc src/backend/parser/parse_utilcmd.c index c032319,d1e1dac..4e9bdbf --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@@ -18,9 -18,8 +18,9 @@@ * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California + * Portions Copyright (c) 2010-2011 Nippon Telegraph and Telephone Corporation * - * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.40 2010/02/26 02:00:53 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.40.4.1 2010/08/18 18:35:30 tgl Exp $ * *------------------------------------------------------------------------- */ diff --cc src/backend/storage/lmgr/proc.c index d532462,c9993a7..a60c20e --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@@ -39,10 -39,6 +39,9 @@@ #include "access/xact.h" #include "miscadmin.h" #include "postmaster/autovacuum.h" +#ifdef PGXC +#include "pgxc/pgxc.h" +#endif - #include "replication/walsender.h" #include "storage/ipc.h" #include "storage/lmgr.h" #include "storage/pmsignal.h" diff --cc src/bin/pg_ctl/pg_ctl.c index 860a677,ffd014e..07d1ae0 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@@ -3,9 -3,8 +3,9 @@@ * pg_ctl --- start/stops/restarts the PostgreSQL server * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group + * Portions Copyright (c) 2010-2011 Nippon Telegraph and Telephone Corporation * - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.122 2010/04/07 03:48:51 itagaki Exp $ + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.122.2.1 2010/09/14 08:05:54 heikki Exp $ * *------------------------------------------------------------------------- */ diff --cc src/bin/pg_dump/pg_dump.c index fe1bf9e,8721e65..1939cc5 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@@ -3408,12 -3409,10 +3409,14 @@@ getTables(int *numTables int i_relhasrules; int i_relhasoids; int i_relfrozenxid; + int i_toastoid; + int i_toastfrozenxid; int i_owning_tab; int i_owning_col; +#ifdef PGXC + int i_pgxclocatortype; + int i_pgxcattnum; +#endif int i_reltablespace; int i_reloptions; int i_toastreloptions; @@@ -3720,12 -3727,10 +3737,14 @@@ i_relhasrules = PQfnumber(res, "relhasrules"); i_relhasoids = PQfnumber(res, "relhasoids"); i_relfrozenxid = PQfnumber(res, "relfrozenxid"); + i_toastoid = PQfnumber(res, "toid"); + i_toastfrozenxid = PQfnumber(res, "tfrozenxid"); i_owning_tab = PQfnumber(res, "owning_tab"); i_owning_col = PQfnumber(res, "owning_col"); +#ifdef PGXC + i_pgxclocatortype = PQfnumber(res, "pgxclocatortype"); + i_pgxcattnum = PQfnumber(res, "pgxcattnum"); +#endif i_reltablespace = PQfnumber(res, "reltablespace"); i_reloptions = PQfnumber(res, "reloptions"); i_toastreloptions = PQfnumber(res, "toast_reloptions"); diff --cc src/include/catalog/catversion.h index 9671a77,748709a..a9f58cc --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@@ -53,10 -53,6 +53,10 @@@ */ /* yyyymmddN */ +#ifdef PGXC - #define CATALOG_VERSION_NO 201105201 ++#define CATALOG_VERSION_NO 201106301 +#else - #define CATALOG_VERSION_NO 201004261 + #define CATALOG_VERSION_NO 201008051 +#endif #endif diff --cc src/include/catalog/heap.h index b0e9845,6a91ddb..1f67121 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@@ -116,13 -115,7 +116,14 @@@ extern void CheckAttributeNamesTypes(Tu bool allow_system_table_mods); extern void CheckAttributeType(const char *attname, Oid atttypid, + List *containing_rowtypes, bool allow_system_table_mods); +#ifdef PGXC +extern void AddRelationDistribution (Oid relid, + DistributeBy *distributeby, + List *parentOids, + TupleDesc descriptor); +#endif + #endif /* HEAP_H */ diff --cc src/include/catalog/pg_aggregate.h index f5ad8a9,bc47aad..49c6147 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@@ -102,343 -74,157 +102,345 @@@ typedef FormData_pg_aggregate *Form_pg_ */ /* avg */ -DATA(insert ( 2100 int8_avg_accum numeric_avg 0 1231 "{0,0}" )); -DATA(insert ( 2101 int4_avg_accum int8_avg 0 1016 "{0,0}" )); -DATA(insert ( 2102 int2_avg_accum int8_avg 0 1016 "{0,0}" )); -DATA(insert ( 2103 numeric_avg_accum numeric_avg 0 1231 "{0,0}" )); -DATA(insert ( 2104 float4_accum float8_avg 0 1022 "{0,0,0}" )); -DATA(insert ( 2105 float8_accum float8_avg 0 1022 "{0,0,0}" )); -DATA(insert ( 2106 interval_accum interval_avg 0 1187 "{0 second,0 second}" )); +#ifdef PGXC +DATA(insert ( 2100 int8_avg_accum numeric_avg_collect numeric_avg 0 1231 "{0,0}" "{0,0}" )); +DATA(insert ( 2101 int4_avg_accum int8_avg_collect int8_avg 0 1016 "{0,0}" "{0,0}" )); +DATA(insert ( 2102 int2_avg_accum int8_avg_collect int8_avg 0 1016 "{0,0}" "{0,0}" )); +DATA(insert ( 2103 numeric_avg_accum numeric_avg_collect numeric_avg 0 1231 "{0,0}" "{0,0}" )); +DATA(insert ( 2104 float4_accum float8_collect float8_avg 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2105 float8_accum float8_collect float8_avg 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2106 interval_accum interval_collect interval_avg 0 1187 "{0 second,0 second}" "{0 second,0 second}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2100 int8_avg_accum numeric_avg 0 1231 "{0,0}" )); +//DATA(insert ( 2101 int4_avg_accum int8_avg 0 1016 "{0,0}" )); +//DATA(insert ( 2102 int2_avg_accum int8_avg 0 1016 "{0,0}" )); +//DATA(insert ( 2103 numeric_avg_accum numeric_avg 0 1231 "{0,0}" )); +//DATA(insert ( 2104 float4_accum float8_avg 0 1022 "{0,0,0}" )); +//DATA(insert ( 2105 float8_accum float8_avg 0 1022 "{0,0,0}" )); +//DATA(insert ( 2106 interval_accum interval_avg 0 1187 "{0 second,0 second}" )); +#endif /* sum */ -DATA(insert ( 2107 int8_sum - 0 1700 _null_ )); -DATA(insert ( 2108 int4_sum - 0 20 _null_ )); -DATA(insert ( 2109 int2_sum - 0 20 _null_ )); -DATA(insert ( 2110 float4pl - 0 700 _null_ )); -DATA(insert ( 2111 float8pl - 0 701 _null_ )); -DATA(insert ( 2112 cash_pl - 0 790 _null_ )); -DATA(insert ( 2113 interval_pl - 0 1186 _null_ )); -DATA(insert ( 2114 numeric_add - 0 1700 _null_ )); +#ifdef PGXC +DATA(insert ( 2107 int8_sum numeric_add - 0 1700 _null_ "0" )); +DATA(insert ( 2108 int4_sum int8_sum_to_int8 - 0 20 _null_ _null_ )); +DATA(insert ( 2109 int2_sum int8_sum_to_int8 - 0 20 _null_ _null_ )); +DATA(insert ( 2110 float4pl float4pl - 0 700 _null_ "0" )); +DATA(insert ( 2111 float8pl float8pl - 0 701 _null_ "0" )); +DATA(insert ( 2112 cash_pl cash_pl - 0 790 _null_ _null_ )); +DATA(insert ( 2113 interval_pl interval_pl - 0 1186 _null_ _null_ )); +DATA(insert ( 2114 numeric_add numeric_add - 0 1700 _null_ "0" )); +#endif +#ifdef PGXC +//DATA(insert ( 2107 int8_sum - 0 1700 _null_ )); +//DATA(insert ( 2108 int4_sum - 0 20 _null_ )); +//DATA(insert ( 2109 int2_sum - 0 20 _null_ )); +//DATA(insert ( 2110 float4pl - 0 700 _null_ )); +//DATA(insert ( 2111 float8pl - 0 701 _null_ )); +//DATA(insert ( 2112 cash_pl - 0 790 _null_ )); +//DATA(insert ( 2113 interval_pl - 0 1186 _null_ )); +//DATA(insert ( 2114 numeric_add - 0 1700 _null_ )); +#endif /* max */ -DATA(insert ( 2115 int8larger - 413 20 _null_ )); -DATA(insert ( 2116 int4larger - 521 23 _null_ )); -DATA(insert ( 2117 int2larger - 520 21 _null_ )); -DATA(insert ( 2118 oidlarger - 610 26 _null_ )); -DATA(insert ( 2119 float4larger - 623 700 _null_ )); -DATA(insert ( 2120 float8larger - 674 701 _null_ )); -DATA(insert ( 2121 int4larger - 563 702 _null_ )); -DATA(insert ( 2122 date_larger - 1097 1082 _null_ )); -DATA(insert ( 2123 time_larger - 1112 1083 _null_ )); -DATA(insert ( 2124 timetz_larger - 1554 1266 _null_ )); -DATA(insert ( 2125 cashlarger - 903 790 _null_ )); -DATA(insert ( 2126 timestamp_larger - 2064 1114 _null_ )); -DATA(insert ( 2127 timestamptz_larger - 1324 1184 _null_ )); -DATA(insert ( 2128 interval_larger - 1334 1186 _null_ )); -DATA(insert ( 2129 text_larger - 666 25 _null_ )); -DATA(insert ( 2130 numeric_larger - 1756 1700 _null_ )); -DATA(insert ( 2050 array_larger - 1073 2277 _null_ )); -DATA(insert ( 2244 bpchar_larger - 1060 1042 _null_ )); -DATA(insert ( 2797 tidlarger - 2800 27 _null_ )); -DATA(insert ( 3526 enum_larger - 3519 3500 _null_ )); +#ifdef PGXC +DATA(insert ( 2115 int8larger int8larger - 413 20 _null_ _null_ )); +DATA(insert ( 2116 int4larger int4larger - 521 23 _null_ _null_ )); +DATA(insert ( 2117 int2larger int2larger - 520 21 _null_ _null_ )); +DATA(insert ( 2118 oidlarger oidlarger - 610 26 _null_ _null_ )); +DATA(insert ( 2119 float4larger float4larger - 623 700 _null_ _null_ )); +DATA(insert ( 2120 float8larger float8larger - 674 701 _null_ _null_ )); +DATA(insert ( 2121 int4larger int4larger - 563 702 _null_ _null_ )); +DATA(insert ( 2122 date_larger date_larger - 1097 1082 _null_ _null_ )); +DATA(insert ( 2123 time_larger time_larger - 1112 1083 _null_ _null_ )); +DATA(insert ( 2124 timetz_larger timetz_larger - 1554 1266 _null_ _null_ )); +DATA(insert ( 2125 cashlarger cashlarger - 903 790 _null_ _null_ )); +DATA(insert ( 2126 timestamp_larger timestamp_larger - 2064 1114 _null_ _null_ )); +DATA(insert ( 2127 timestamptz_larger timestamptz_larger - 1324 1184 _null_ _null_ )); +DATA(insert ( 2128 interval_larger interval_larger - 1334 1186 _null_ _null_ )); +DATA(insert ( 2129 text_larger text_larger - 666 25 _null_ _null_ )); +DATA(insert ( 2130 numeric_larger numeric_larger - 1756 1700 _null_ _null_ )); +DATA(insert ( 2050 array_larger array_larger - 1073 2277 _null_ _null_ )); +DATA(insert ( 2244 bpchar_larger bpchar_larger - 1060 1042 _null_ _null_ )); +DATA(insert ( 2797 tidlarger tidlarger - 2800 27 _null_ _null_ )); +DATA(insert ( 3526 enum_larger enum_larger - 3519 3500 _null_ _null_ )); +#endif +#ifdef PGXC +//DATA(insert ( 2115 int8larger - 413 20 _null_ )); +//DATA(insert ( 2116 int4larger - 521 23 _null_ )); +//DATA(insert ( 2117 int2larger - 520 21 _null_ )); +//DATA(insert ( 2118 oidlarger - 610 26 _null_ )); +//DATA(insert ( 2119 float4larger - 623 700 _null_ )); +//DATA(insert ( 2120 float8larger - 674 701 _null_ )); +//DATA(insert ( 2121 int4larger - 563 702 _null_ )); +//DATA(insert ( 2122 date_larger - 1097 1082 _null_ )); +//DATA(insert ( 2123 time_larger - 1112 1083 _null_ )); +//DATA(insert ( 2124 timetz_larger - 1554 1266 _null_ )); +//DATA(insert ( 2125 cashlarger - 903 790 _null_ )); +//DATA(insert ( 2126 timestamp_larger - 2064 1114 _null_ )); +//DATA(insert ( 2127 timestamptz_larger - 1324 1184 _null_ )); +//DATA(insert ( 2128 interval_larger - 1334 1186 _null_ )); +//DATA(insert ( 2129 text_larger - 666 25 _null_ )); +//DATA(insert ( 2130 numeric_larger - 1756 1700 _null_ )); +//DATA(insert ( 2050 array_larger - 1073 2277 _null_ )); +//DATA(insert ( 2244 bpchar_larger - 1060 1042 _null_ )); +//DATA(insert ( 2797 tidlarger - 2800 27 _null_ )); +//DATA(insert ( 3526 enum_larger - 3519 3500 _null_ )); +#endif /* min */ -DATA(insert ( 2131 int8smaller - 412 20 _null_ )); -DATA(insert ( 2132 int4smaller - 97 23 _null_ )); -DATA(insert ( 2133 int2smaller - 95 21 _null_ )); -DATA(insert ( 2134 oidsmaller - 609 26 _null_ )); -DATA(insert ( 2135 float4smaller - 622 700 _null_ )); -DATA(insert ( 2136 float8smaller - 672 701 _null_ )); -DATA(insert ( 2137 int4smaller - 562 702 _null_ )); -DATA(insert ( 2138 date_smaller - 1095 1082 _null_ )); -DATA(insert ( 2139 time_smaller - 1110 1083 _null_ )); -DATA(insert ( 2140 timetz_smaller - 1552 1266 _null_ )); -DATA(insert ( 2141 cashsmaller - 902 790 _null_ )); -DATA(insert ( 2142 timestamp_smaller - 2062 1114 _null_ )); -DATA(insert ( 2143 timestamptz_smaller - 1322 1184 _null_ )); -DATA(insert ( 2144 interval_smaller - 1332 1186 _null_ )); -DATA(insert ( 2145 text_smaller - 664 25 _null_ )); -DATA(insert ( 2146 numeric_smaller - 1754 1700 _null_ )); -DATA(insert ( 2051 array_smaller - 1072 2277 _null_ )); -DATA(insert ( 2245 bpchar_smaller - 1058 1042 _null_ )); -DATA(insert ( 2798 tidsmaller - 2799 27 _null_ )); -DATA(insert ( 3527 enum_smaller - 3518 3500 _null_ )); +#ifdef PGXC +DATA(insert ( 2131 int8smaller int8smaller - 412 20 _null_ _null_ )); +DATA(insert ( 2132 int4smaller int4smaller - 97 23 _null_ _null_ )); +DATA(insert ( 2133 int2smaller int2smaller - 95 21 _null_ _null_ )); +DATA(insert ( 2134 oidsmaller oidsmaller - 609 26 _null_ _null_ )); +DATA(insert ( 2135 float4smaller float4smaller - 622 700 _null_ _null_ )); +DATA(insert ( 2136 float8smaller float8smaller - 672 701 _null_ _null_ )); +DATA(insert ( 2137 int4smaller int4smaller - 562 702 _null_ _null_ )); +DATA(insert ( 2138 date_smaller date_smaller - 1095 1082 _null_ _null_ )); +DATA(insert ( 2139 time_smaller time_smaller - 1110 1083 _null_ _null_ )); +DATA(insert ( 2140 timetz_smaller timetz_smaller - 1552 1266 _null_ _null_ )); +DATA(insert ( 2141 cashsmaller cashsmaller - 902 790 _null_ _null_ )); +DATA(insert ( 2142 timestamp_smaller timestamp_smaller - 2062 1114 _null_ _null_ )); +DATA(insert ( 2143 timestamptz_smaller timestamptz_smaller - 1322 1184 _null_ _null_ )); +DATA(insert ( 2144 interval_smaller interval_smaller - 1332 1186 _null_ _null_ )); +DATA(insert ( 2145 text_smaller text_smaller - 664 25 _null_ _null_ )); +DATA(insert ( 2146 numeric_smaller numeric_smaller - 1754 1700 _null_ _null_ )); +DATA(insert ( 2051 array_smaller array_smaller - 1072 2277 _null_ _null_ )); +DATA(insert ( 2245 bpchar_smaller bpchar_smaller - 1058 1042 _null_ _null_ )); +DATA(insert ( 2798 tidsmaller tidsmaller - 2799 27 _null_ _null_ )); +DATA(insert ( 3527 enum_smaller enum_smaller - 3518 3500 _null_ _null_ )); +#endif +#ifdef PGXC +//DATA(insert ( 2131 int8smaller - 412 20 _null_ )); +//DATA(insert ( 2132 int4smaller - 97 23 _null_ )); +//DATA(insert ( 2133 int2smaller - 95 21 _null_ )); +//DATA(insert ( 2134 oidsmaller - 609 26 _null_ )); +//DATA(insert ( 2135 float4smaller - 622 700 _null_ )); +//DATA(insert ( 2136 float8smaller - 672 701 _null_ )); +//DATA(insert ( 2137 int4smaller - 562 702 _null_ )); +//DATA(insert ( 2138 date_smaller - 1095 1082 _null_ )); +//DATA(insert ( 2139 time_smaller - 1110 1083 _null_ )); +//DATA(insert ( 2140 timetz_smaller - 1552 1266 _null_ )); +//DATA(insert ( 2141 cashsmaller - 902 790 _null_ )); +//DATA(insert ( 2142 timestamp_smaller - 2062 1114 _null_ )); +//DATA(insert ( 2143 timestamptz_smaller - 1322 1184 _null_ )); +//DATA(insert ( 2144 interval_smaller - 1332 1186 _null_ )); +//DATA(insert ( 2145 text_smaller - 664 25 _null_ )); +//DATA(insert ( 2146 numeric_smaller - 1754 1700 _null_ )); +//DATA(insert ( 2051 array_smaller - 1072 2277 _null_ )); +//DATA(insert ( 2245 bpchar_smaller - 1058 1042 _null_ )); +//DATA(insert ( 2798 tidsmaller - 2799 27 _null_ )); +//DATA(insert ( 3527 enum_smaller - 3518 3500 _null_ )); +#endif /* count */ -DATA(insert ( 2147 int8inc_any - 0 20 "0" )); -DATA(insert ( 2803 int8inc - 0 20 "0" )); +/* Final function is data type conversion function numeric_int8 is refernced by OID because of ambiguous defininition in pg_proc */ +#ifdef PGXC +DATA(insert ( 2147 int8inc_any int8_sum_to_int8 - 0 20 "0" "0" )); +DATA(insert ( 2803 int8inc int8_sum_to_int8 - 0 20 "0" "0" )); +#endif +#ifdef PGXC +//DATA(insert ( 2147 int8inc_any - 0 20 "0" )); +//DATA(insert ( 2803 int8inc - 0 20 "0" )); +#endif /* var_pop */ -DATA(insert ( 2718 int8_accum numeric_var_pop 0 1231 "{0,0,0}" )); -DATA(insert ( 2719 int4_accum numeric_var_pop 0 1231 "{0,0,0}" )); -DATA(insert ( 2720 int2_accum numeric_var_pop 0 1231 "{0,0,0}" )); -DATA(insert ( 2721 float4_accum float8_var_pop 0 1022 "{0,0,0}" )); -DATA(insert ( 2722 float8_accum float8_var_pop 0 1022 "{0,0,0}" )); -DATA(insert ( 2723 numeric_accum numeric_var_pop 0 1231 "{0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2718 int8_accum numeric_collect numeric_var_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2719 int4_accum numeric_collect numeric_var_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2720 int2_accum numeric_collect numeric_var_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2721 float4_accum float8_collect float8_var_pop 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2722 float8_accum float8_collect float8_var_pop 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2723 numeric_accum numeric_collect numeric_var_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2718 int8_accum numeric_var_pop 0 1231 "{0,0,0}" )); +//DATA(insert ( 2719 int4_accum numeric_var_pop 0 1231 "{0,0,0}" )); +//DATA(insert ( 2720 int2_accum numeric_var_pop 0 1231 "{0,0,0}" )); +//DATA(insert ( 2721 float4_accum float8_var_pop 0 1022 "{0,0,0}" )); +//DATA(insert ( 2722 float8_accum float8_var_pop 0 1022 "{0,0,0}" )); +//DATA(insert ( 2723 numeric_accum numeric_var_pop 0 1231 "{0,0,0}" )); +#endif /* var_samp */ -DATA(insert ( 2641 int8_accum numeric_var_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2642 int4_accum numeric_var_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2643 int2_accum numeric_var_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2644 float4_accum float8_var_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2645 float8_accum float8_var_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2646 numeric_accum numeric_var_samp 0 1231 "{0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2641 int8_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2642 int4_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2643 int2_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2644 float4_accum float8_collect float8_var_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2645 float8_accum float8_collect float8_var_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2646 numeric_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2641 int8_accum numeric_var_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2642 int4_accum numeric_var_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2643 int2_accum numeric_var_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2644 float4_accum float8_var_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2645 float8_accum float8_var_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2646 numeric_accum numeric_var_samp 0 1231 "{0,0,0}" )); +#endif /* variance: historical Postgres syntax for var_samp */ -DATA(insert ( 2148 int8_accum numeric_var_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2149 int4_accum numeric_var_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2150 int2_accum numeric_var_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2151 float4_accum float8_var_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2152 float8_accum float8_var_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2153 numeric_accum numeric_var_samp 0 1231 "{0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2148 int8_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2149 int4_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2150 int2_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2151 float4_accum float8_collect float8_var_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2152 float8_accum float8_collect float8_var_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2153 numeric_accum numeric_collect numeric_var_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2148 int8_accum numeric_var_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2149 int4_accum numeric_var_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2150 int2_accum numeric_var_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2151 float4_accum float8_var_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2152 float8_accum float8_var_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2153 numeric_accum numeric_var_samp 0 1231 "{0,0,0}" )); +#endif /* stddev_pop */ -DATA(insert ( 2724 int8_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); -DATA(insert ( 2725 int4_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); -DATA(insert ( 2726 int2_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); -DATA(insert ( 2727 float4_accum float8_stddev_pop 0 1022 "{0,0,0}" )); -DATA(insert ( 2728 float8_accum float8_stddev_pop 0 1022 "{0,0,0}" )); -DATA(insert ( 2729 numeric_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2724 int8_accum numeric_collect numeric_stddev_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2725 int4_accum numeric_collect numeric_stddev_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2726 int2_accum numeric_collect numeric_stddev_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2727 float4_accum float8_collect float8_stddev_pop 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2728 float8_accum float8_collect float8_stddev_pop 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2729 numeric_accum numeric_collect numeric_stddev_pop 0 1231 "{0,0,0}" "{0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2724 int8_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); +//DATA(insert ( 2725 int4_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); +//DATA(insert ( 2726 int2_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); +//DATA(insert ( 2727 float4_accum float8_stddev_pop 0 1022 "{0,0,0}" )); +//DATA(insert ( 2728 float8_accum float8_stddev_pop 0 1022 "{0,0,0}" )); +//DATA(insert ( 2729 numeric_accum numeric_stddev_pop 0 1231 "{0,0,0}" )); +#endif /* stddev_samp */ -DATA(insert ( 2712 int8_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2713 int4_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2714 int2_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2715 float4_accum float8_stddev_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2716 float8_accum float8_stddev_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2717 numeric_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2712 int8_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2713 int4_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2714 int2_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2715 float4_accum float8_collect float8_stddev_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2716 float8_accum float8_collect float8_stddev_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2717 numeric_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2712 int8_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2713 int4_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2714 int2_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2715 float4_accum float8_stddev_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2716 float8_accum float8_stddev_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2717 numeric_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +#endif /* stddev: historical Postgres syntax for stddev_samp */ -DATA(insert ( 2154 int8_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2155 int4_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2156 int2_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); -DATA(insert ( 2157 float4_accum float8_stddev_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2158 float8_accum float8_stddev_samp 0 1022 "{0,0,0}" )); -DATA(insert ( 2159 numeric_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2154 int8_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2155 int4_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2156 int2_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2157 float4_accum float8_collect float8_stddev_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2158 float8_accum float8_collect float8_stddev_samp 0 1022 "{0,0,0}" "{0,0,0}" )); +DATA(insert ( 2159 numeric_accum numeric_collect numeric_stddev_samp 0 1231 "{0,0,0}" "{0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2154 int8_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2155 int4_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2156 int2_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +//DATA(insert ( 2157 float4_accum float8_stddev_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2158 float8_accum float8_stddev_samp 0 1022 "{0,0,0}" )); +//DATA(insert ( 2159 numeric_accum numeric_stddev_samp 0 1231 "{0,0,0}" )); +#endif /* SQL2003 binary regression aggregates */ -DATA(insert ( 2818 int8inc_float8_float8 - 0 20 "0" )); -DATA(insert ( 2819 float8_regr_accum float8_regr_sxx 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2820 float8_regr_accum float8_regr_syy 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2821 float8_regr_accum float8_regr_sxy 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2822 float8_regr_accum float8_regr_avgx 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2823 float8_regr_accum float8_regr_avgy 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2824 float8_regr_accum float8_regr_r2 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2825 float8_regr_accum float8_regr_slope 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2826 float8_regr_accum float8_regr_intercept 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2827 float8_regr_accum float8_covar_pop 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2828 float8_regr_accum float8_covar_samp 0 1022 "{0,0,0,0,0,0}" )); -DATA(insert ( 2829 float8_regr_accum float8_corr 0 1022 "{0,0,0,0,0,0}" )); +#ifdef PGXC +DATA(insert ( 2818 int8inc_float8_float8 int8_sum_to_int8 - 0 20 "0" _null_ )); +DATA(insert ( 2819 float8_regr_accum float8_regr_collect float8_regr_sxx 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2820 float8_regr_accum float8_regr_collect float8_regr_syy 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2821 float8_regr_accum float8_regr_collect float8_regr_sxy 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2822 float8_regr_accum float8_regr_collect float8_regr_avgx 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2823 float8_regr_accum float8_regr_collect float8_regr_avgy 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2824 float8_regr_accum float8_regr_collect float8_regr_r2 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2825 float8_regr_accum float8_regr_collect float8_regr_slope 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2826 float8_regr_accum float8_regr_collect float8_regr_intercept 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2827 float8_regr_accum float8_regr_collect float8_covar_pop 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2828 float8_regr_accum float8_regr_collect float8_covar_samp 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +DATA(insert ( 2829 float8_regr_accum float8_regr_collect float8_corr 0 1022 "{0,0,0,0,0,0}" "{0,0,0,0,0,0}" )); +#endif +#ifdef PGXC +//DATA(insert ( 2818 int8inc_float8_float8 - 0 20 "0" )); +//DATA(insert ( 2819 float8_regr_accum float8_regr_sxx 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2820 float8_regr_accum float8_regr_syy 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2821 float8_regr_accum float8_regr_sxy 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2822 float8_regr_accum float8_regr_avgx 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2823 float8_regr_accum float8_regr_avgy 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2824 float8_regr_accum float8_regr_r2 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2825 float8_regr_accum float8_regr_slope 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2826 float8_regr_accum float8_regr_intercept 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2827 float8_regr_accum float8_covar_pop 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2828 float8_regr_accum float8_covar_samp 0 1022 "{0,0,0,0,0,0}" )); +//DATA(insert ( 2829 float8_regr_accum float8_corr 0 1022 "{0,0,0,0,0,0}" )); +#endif /* boolean-and and boolean-or */ -DATA(insert ( 2517 booland_statefunc - 0 16 _null_ )); -DATA(insert ( 2518 boolor_statefunc - 0 16 _null_ )); -DATA(insert ( 2519 booland_statefunc - 0 16 _null_ )); +#ifdef PGXC +DATA(insert ( 2517 booland_statefunc booland_statefunc - 0 16 _null_ _null_ )); +DATA(insert ( 2518 boolor_statefunc boolor_statefunc - 0 16 _null_ _null_ )); +DATA(insert ( 2519 booland_statefunc booland_statefunc - 0 16 _null_ _null_ )); +#endif +#ifdef PGXC +//DATA(insert ( 2517 booland_statefunc - 0 16 _null_ )); +//DATA(insert ( 2518 boolor_statefunc - 0 16 _null_ )); +//DATA(insert ( 2519 booland_statefunc - 0 16 _null_ )); +#endif /* bitwise integer */ -DATA(insert ( 2236 int2and - 0 21 _null_ )); -DATA(insert ( 2237 int2or - 0 21 _null_ )); -DATA(insert ( 2238 int4and - 0 23 _null_ )); -DATA(insert ( 2239 int4or - 0 23 _null_ )); -DATA(insert ( 2240 int8and - 0 20 _null_ )); -DATA(insert ( 2241 int8or - 0 20 _null_ )); -DATA(insert ( 2242 bitand - 0 1560 _null_ )); -DATA(insert ( 2243 bitor - 0 1560 _null_ )); +#ifdef PGXC +DATA(insert ( 2236 int2and int2and - 0 21 _null_ _null_ )); +DATA(insert ( 2237 int2or int2or - 0 21 _null_ _null_ )); +DATA(insert ( 2238 int4and int4and - 0 23 _null_ _null_ )); +DATA(insert ( 2239 int4or int4or - 0 23 _null_ _null_ )); +DATA(insert ( 2240 int8and int8and - 0 20 _null_ _null_ )); +DATA(insert ( 2241 int8or int8or - 0 20 _null_ _null_ )); +DATA(insert ( 2242 bitand bitand - 0 1560 _null_ _null_ )); +DATA(insert ( 2243 bitor bitor - 0 1560 _null_ _null_ )); +#endif +#ifdef PGXC +//DATA(insert ( 2236 int2and - 0 21 _null_ )); +//DATA(insert ( 2237 int2or - 0 21 _null_ )); +//DATA(insert ( 2238 int4and - 0 23 _null_ )); +//DATA(insert ( 2239 int4or - 0 23 _null_ )); +//DATA(insert ( 2240 int8and - 0 20 _null_ )); +//DATA(insert ( 2241 int8or - 0 20 _null_ )); +//DATA(insert ( 2242 bitand - 0 1560 _null_ )); +//DATA(insert ( 2243 bitor - 0 1560 _null_ )); +#endif /* xml */ -DATA(insert ( 2901 xmlconcat2 - 0 142 _null_ )); +#ifdef PGXC +DATA(insert ( 2901 xmlconcat2 xmlconcat2 - 0 142 _null_ _null_ )); +#endif +#ifdef PGXC +//DATA(insert ( 2901 xmlconcat2 - 0 142 _null_ )); +#endif /* array */ -DATA(insert ( 2335 array_agg_transfn array_agg_finalfn 0 2281 _null_ )); +#ifdef PGXC +DATA(insert ( 2335 array_agg_transfn - array_agg_finalfn 0 2281 _null_ _null_ )); +#endif +#ifdef PGXC +//DATA(insert ( 2335 array_agg_transfn array_agg_finalfn 0 2281 _null_ )); +#endif /* text */ -DATA(insert ( 3538 string_agg_transfn string_agg_finalfn 0 2281 _null_ )); +#ifdef PGXC - DATA(insert (3537 string_agg_transfn - string_agg_finalfn 0 2281 _null_ _null_ )); - DATA(insert (3538 string_agg_delim_transfn - string_agg_finalfn 0 2281 _null_ _null_ )); ++DATA(insert (3538 string_agg_transfn - string_agg_finalfn 0 2281 _null_ _null_ )); ++#endif ++#ifdef PGXC ++//DATA(insert ( 3538 string_agg_transfn string_agg_finalfn 0 2281 _null_ )); +#endif /* * prototypes for functions in pg_aggregate.c diff --cc src/include/catalog/pg_proc.h index 6d8163e,31a9650..c702b4e --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@@ -2830,30 -2829,12 +2830,26 @@@ DATA(insert OID = 2816 ( float8_covar_ DESCR("COVAR_SAMP(double, double) aggregate final function"); DATA(insert OID = 2817 ( float8_corr PGNSP PGUID 12 1 0 0 f f f t f i 1 0 701 "1022" _null_ _null_ _null_ _null_ float8_corr _null_ _null_ _null_ )); DESCR("CORR(double, double) aggregate final function"); +#ifdef PGXC +DATA(insert OID = 2966 ( float8_collect PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1022 "1022 1022" _null_ _null_ _null_ _null_ float8_collect _null_ _null_ _null_ )); +DESCR("aggregate collection function"); +DATA(insert OID = 2964 ( numeric_avg_collect PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 1231" _null_ _null_ _null_ _null_ numeric_avg_collect _null_ _null_ _null_ )); +DESCR("aggregate collection function"); +DATA(insert OID = 2968 ( numeric_collect PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 1231" _null_ _null_ _null_ _null_ numeric_collect _null_ _null_ _null_ )); +DESCR("aggregate collection function"); +DATA(insert OID = 2967 ( interval_collect PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1187 "1187 1187" _null_ _null_ _null_ _null_ interval_collect _null_ _null_ _null_ )); +DESCR("aggregate transition function"); +DATA(insert OID = 2965 ( int8_avg_collect PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1016 "1016 1016" _null_ _null_ _null_ _null_ int8_avg_collect _null_ _null_ _null_ )); +DESCR("AVG(int) collection function"); +DATA(insert OID = 2995 ( float8_regr_collect PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1022 "1022 1022" _null_ _null_ _null_ _null_ float8_regr_collect _null_ _null_ _null_ )); +DESCR("REGR_...(double, double) collection function"); +#endif - DATA(insert OID = 3534 ( string_agg_transfn PGNSP PGUID 12 1 0 0 f f f f f i 2 0 2281 "2281 25" _null_ _null_ _null_ _null_ string_agg_transfn _null_ _null_ _null_ )); - DESCR("string_agg(text) transition function"); - DATA(insert OID = 3535 ( string_agg_delim_transfn PGNSP PGUID 12 1 0 0 f f f f f i 3 0 2281 "2281 25 25" _null_ _null_ _null_ _null_ string_agg_delim_transfn _null_ _null_ _null_ )); + DATA(insert OID = 3535 ( string_agg_transfn PGNSP PGUID 12 1 0 0 f f f f f i 3 0 2281 "2281 25 25" _null_ _null_ _null_ _null_ string_agg_transfn _null_ _null_ _null_ )); DESCR("string_agg(text, text) transition function"); DATA(insert OID = 3536 ( string_agg_finalfn PGNSP PGUID 12 1 0 0 f f f f f i 1 0 25 "2281" _null_ _null_ _null_ _null_ string_agg_finalfn _null_ _null_ _null_ )); - DESCR("string_agg final function"); - DATA(insert OID = 3537 ( string_agg PGNSP PGUID 12 1 0 0 t f f f f i 1 0 25 "25" _null_ _null_ _null_ _null_ aggregate_dummy _null_ _null_ _null_ )); - DESCR("concatenate aggregate input into an string"); + DESCR("string_agg(text, text) final function"); DATA(insert OID = 3538 ( string_agg PGNSP PGUID 12 1 0 0 t f f f f i 2 0 25 "25 25" _null_ _null_ _null_ _null_ aggregate_dummy _null_ _null_ _null_ )); - DESCR("concatenate aggregate input into an string with delimiter"); + DESCR("concatenate aggregate input into a string"); /* To ASCII conversion */ DATA(insert OID = 1845 ( to_ascii PGNSP PGUID 12 1 0 0 f f f t f i 1 0 25 "25" _null_ _null_ _null_ _null_ to_ascii_default _null_ _null_ _null_ )); diff --cc src/include/nodes/parsenodes.h index 22b3b75,54eebbc..c1fef76 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@@ -12,9 -12,8 +12,9 @@@ * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California + * Portions Copyright (c) 2010-2011 Nippon Telegraph and Telephone Corporation * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.432 2010/02/26 02:01:25 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.432.4.1 2010/08/18 18:35:30 tgl Exp $ * *------------------------------------------------------------------------- */ diff --cc src/include/parser/parse_func.h index 3c9ff12,0b68c0e..41f36ea --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@@ -83,7 -83,5 +83,9 @@@ extern Oid LookupAggNameTypeNames(List bool noError); extern void check_pg_get_expr_args(ParseState *pstate, Oid fnoid, List *args); + +#ifdef PGXC +extern bool IsParseFuncImmutable(ParseState *pstate, List *fn_args, List *funcname, bool func_variadic); +#endif ++ #endif /* PARSE_FUNC_H */ diff --cc src/include/storage/procarray.h index 6284198,55ca71c..b39d203 --- a/src/include/storage/procarray.h +++ b/src/include/storage/procarray.h @@@ -29,15 -28,6 +29,15 @@@ extern void ProcArrayRemove(PGPROC *pro extern void ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid); extern void ProcArrayClearTransaction(PGPROC *proc); +#ifdef PGXC /* PGXC_DATANODE */ +extern Size AnalyzeProcArrayShmemSize(void); +extern void AnalyzeProcArrayAdd(PGPROC *proc); +extern void CreateSharedAnalyzeProcArray(void); +extern void AnalyzeProcArrayRemove(PGPROC *proc, TransactionId latestXid); +extern void SetGlobalSnapshotData(int xmin, int xmax, int xcnt, int *xip); +extern void UnsetGlobalSnapshotData(void); +#endif /* PGXC */ - extern void ProcArrayInitRecoveryInfo(TransactionId oldestActiveXid); ++ extern void ProcArrayApplyRecoveryInfo(RunningTransactions running); extern void ProcArrayApplyXidAssignment(TransactionId topxid, int nsubxids, TransactionId *subxids); diff --cc src/test/regress/expected/.gitignore index ef0f486,e14ce3a..63d87f0 --- a/src/test/regress/expected/.gitignore +++ b/src/test/regress/expected/.gitignore @@@ -7,4 -6,3 +7,4 @@@ /largeobject_1.out /misc.out /tablespace.out - /tablespace_1.out ++/tablespace_1.out diff --cc src/test/regress/expected/create_index_1.out index 67d3939,0000000..96ce285 mode 100644,000000..100644 --- a/src/test/regress/expected/create_index_1.out +++ b/src/test/regress/expected/create_index_1.out @@@ -1,953 -1,0 +1,985 @@@ +-- +-- CREATE_INDEX +-- Create ancillary data structures (i.e. indices) +-- +-- +-- BTREE +-- +CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops); +CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops); +CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops); +CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops); +CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops); +CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops); +CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops); +CREATE INDEX tenk1_thous_tenthous ON tenk1 (thousand, tenthous); +CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops); +CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops); +CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops); +CREATE INDEX rix ON road USING btree (name text_ops); +CREATE INDEX iix ON ihighway USING btree (name text_ops); +CREATE INDEX six ON shighway USING btree (name text_ops); +-- test comments +COMMENT ON INDEX six_wrong IS 'bad index'; +ERROR: relation "six_wrong" does not exist +COMMENT ON INDEX six IS 'good index'; +COMMENT ON INDEX six IS NULL; +-- +-- BTREE ascending/descending cases +-- +-- we load int4/text from pure descending data (each key is a new +-- low key) and name/f8 from pure ascending data (each key is a new +-- high key). we had a bug where new low keys would sometimes be +-- "lost". +-- +CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops); +CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops); +CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops); +CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops); +-- +-- BTREE partial indices +-- +CREATE INDEX onek2_u1_prtl ON onek2 USING btree(unique1 int4_ops) + where unique1 < 20 or unique1 > 980; +CREATE INDEX onek2_u2_prtl ON onek2 USING btree(unique2 int4_ops) + where stringu1 < 'B'; +CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 name_ops) + where onek2.stringu1 >= 'J' and onek2.stringu1 < 'K'; +-- +-- GiST (rtree-equivalent opclasses only) +-- +CREATE INDEX grect2ind ON fast_emp4000 USING gist (home_base); +CREATE INDEX gpolygonind ON polygon_tbl USING gist (f1); +CREATE INDEX gcircleind ON circle_tbl USING gist (f1); +CREATE INDEX gpointind ON point_tbl USING gist (f1); +CREATE TEMP TABLE gpolygon_tbl AS + SELECT polygon(home_base) AS f1 FROM slow_emp4000; +ERROR: INTO clause not yet supported +INSERT INTO gpolygon_tbl VALUES ( '(1000,0,0,1000)' ); +ERROR: relation "gpolygon_tbl" does not exist +LINE 1: INSERT INTO gpolygon_tbl VALUES ( '(1000,0,0,1000)' ); + ^ +INSERT INTO gpolygon_tbl VALUES ( '(0,1000,1000,1000)' ); +ERROR: relation "gpolygon_tbl" does not exist +LINE 1: INSERT INTO gpolygon_tbl VALUES ( '(0,1000,1000,1000)' ); + ^ +CREATE TEMP TABLE gcircle_tbl AS + SELECT circle(home_base) AS f1 FROM slow_emp4000; +ERROR: INTO clause not yet supported +CREATE INDEX ggpolygonind ON gpolygon_tbl USING gist (f1); +ERROR: relation "gpolygon_tbl" does not exist +CREATE INDEX ggcircleind ON gcircle_tbl USING gist (f1); +ERROR: relation "gcircle_tbl" does not exist +SET enable_seqscan = ON; +SET enable_indexscan = OFF; +SET enable_bitmapscan = OFF; +SELECT * FROM fast_emp4000 + WHERE home_base @ '(200,200),(2000,1000)'::box + ORDER BY (home_base[0])[0]; + home_base +----------- +(0 rows) + +SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box; + count +------- + 1 +(1 row) + +SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL; + count +------- + 138 +(1 row) + +SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon + ORDER BY (poly_center(f1))[0]; + id | f1 +----+--------------------- + 1 | ((2,0),(2,4),(0,0)) +(1 row) + +SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) + ORDER BY area(f1); + f1 +--------------- + <(1,2),3> + <(1,3),5> + <(1,2),100> + <(100,1),115> +(4 rows) + +SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon; +ERROR: relation "gpolygon_tbl" does not exist +LINE 1: SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,... + ^ +SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle; +ERROR: relation "gcircle_tbl" does not exist +LINE 1: SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500... + ^ +SELECT count(*) FROM point_tbl WHERE f1 <@ box '(0,0,100,100)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl WHERE box '(0,0,100,100)' @> f1; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl WHERE f1 <@ polygon '(0,0),(0,100),(100,100),(50,50),(100,0),(0,0)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl WHERE f1 <@ circle '<(50,50),50>'; + count +------- + 1 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)'; + count +------- + 2 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)'; + count +------- + 1 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)'; + count +------- + 3 +(1 row) + +SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)'; + count +------- + 1 +(1 row) + +SET enable_seqscan = OFF; +SET enable_indexscan = ON; +SET enable_bitmapscan = ON; +--EXPLAIN (COSTS OFF) +--SELECT * FROM fast_emp4000 +-- WHERE home_base @ '(200,200),(2000,1000)'::box +-- ORDER BY (home_base[0])[0]; +SELECT * FROM fast_emp4000 + WHERE home_base @ '(200,200),(2000,1000)'::box + ORDER BY (home_base[0])[0]; + home_base +----------- +(0 rows) + +--EXPLAIN (COSTS OFF) +--SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box; +SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box; + count +------- + 1 +(1 row) + +--EXPLAIN (COSTS OFF) +--SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL; +SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL; + count +------- + 138 +(1 row) + +--EXPLAIN (COSTS OFF) +--SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon +-- ORDER BY (poly_center(f1))[0]; +SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon + ORDER BY (poly_center(f1))[0]; + id | f1 +----+--------------------- + 1 | ((2,0),(2,4),(0,0)) +(1 row) + +--EXPLAIN (COSTS OFF) +--SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) +-- ORDER BY area(f1); +SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1) + ORDER BY area(f1); + f1 +--------------- + <(1,2),3> + <(1,3),5> + <(1,2),100> + <(100,1),115> +(4 rows) + +EXPLAIN (COSTS OFF) +SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon; +ERROR: relation "gpolygon_tbl" does not exist +LINE 2: SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,... + ^ +SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,0)'::polygon; +ERROR: relation "gpolygon_tbl" does not exist +LINE 1: SELECT count(*) FROM gpolygon_tbl WHERE f1 && '(1000,1000,0,... + ^ +EXPLAIN (COSTS OFF) +SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle; +ERROR: relation "gcircle_tbl" does not exist +LINE 2: SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500... + ^ +SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500>'::circle; +ERROR: relation "gcircle_tbl" does not exist +LINE 1: SELECT count(*) FROM gcircle_tbl WHERE f1 && '<(500,500),500... + ^ +EXPLAIN (COSTS OFF) +SELECT cou... [truncated message content] |
From: Ashutosh B. <ash...@us...> - 2011-06-29 08:13:24
|
Project "Postgres-XC". The branch, master has been updated via bc0decce1cb03d4f645f38bb61c7f73b16445fcb (commit) from 51355d7b7c7cde644fd754ace4e21b746840e4f9 (commit) - Log ----------------------------------------------------------------- commit bc0decce1cb03d4f645f38bb61c7f73b16445fcb Author: Ashutosh Bapat <ash...@en...> Date: Wed Jun 29 13:39:12 2011 +0530 Since aggregation can work without collection function, user need not provide collection function for user-defined aggregate. But in such cases aggregate will not be pushed to the datanodes. This change also renders the alternate output file create_aggregate_1.out, hence deleted it. diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 6971dc1..c5ad77c 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -67,7 +67,7 @@ AggregateCreate(const char *aggName, Form_pg_proc proc; Oid transfn; #ifdef PGXC - Oid collectfn; + Oid collectfn = InvalidOid; /* can be omitted */ #endif Oid finalfn = InvalidOid; /* can be omitted */ Oid sortop = InvalidOid; /* can be omitted */ @@ -91,8 +91,6 @@ AggregateCreate(const char *aggName, elog(ERROR, "aggregate must have a transition function"); #ifdef PGXC - if (!aggcollectfnName) - elog(ERROR, "aggregate must have a collection function"); if (aggTransType == INTERNALOID) ereport(ERROR, @@ -173,20 +171,23 @@ AggregateCreate(const char *aggName, ReleaseSysCache(tup); #ifdef PGXC - /* - * Collection function must be of two arguments, both of type aggTransType - * and return type is also aggTransType - */ - fnArgs[0] = aggTransType; - fnArgs[1] = aggTransType; - collectfn = lookup_agg_function(aggcollectfnName, 2, fnArgs, - &rettype); - if (rettype != aggTransType) - ereport(ERROR, - (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("return type of collection function %s is not %s", - NameListToString(aggcollectfnName), - format_type_be(aggTransType)))); + if (aggcollectfnName) + { + /* + * Collection function must be of two arguments, both of type aggTransType + * and return type is also aggTransType + */ + fnArgs[0] = aggTransType; + fnArgs[1] = aggTransType; + collectfn = lookup_agg_function(aggcollectfnName, 2, fnArgs, + &rettype); + if (rettype != aggTransType) + ereport(ERROR, + (errcode(ERRCODE_DATATYPE_MISMATCH), + errmsg("return type of collection function %s is not %s", + NameListToString(aggcollectfnName), + format_type_be(aggTransType)))); + } #endif /* handle finalfn, if supplied */ @@ -329,11 +330,14 @@ AggregateCreate(const char *aggName, recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL); #ifdef PGXC - /* Depends on collection function */ - referenced.classId = ProcedureRelationId; - referenced.objectId = collectfn; - referenced.objectSubId = 0; - recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL); + if (OidIsValid(collectfn)) + { + /* Depends on collection function */ + referenced.classId = ProcedureRelationId; + referenced.objectId = collectfn; + referenced.objectSubId = 0; + recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL); + } #endif /* Depends on final function, if any */ diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c index 6b9f86e..89201c2 100644 --- a/src/backend/commands/aggregatecmds.c +++ b/src/backend/commands/aggregatecmds.c @@ -59,8 +59,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) char *initval = NULL; #ifdef PGXC List *collectfuncName = NIL; - TypeName *collectType = NULL; - Oid collectTypeId; char *initcollect = NULL; #endif Oid *aggArgTypes; @@ -106,8 +104,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) #ifdef PGXC else if (pg_strcasecmp(defel->defname, "cfunc") == 0) collectfuncName = defGetQualifiedName(defel); - else if (pg_strcasecmp(defel->defname, "ctype") == 0) - collectType = defGetTypeName(defel); else if (pg_strcasecmp(defel->defname, "initcollect") == 0) initcollect = defGetString(defel); #endif @@ -130,21 +126,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("aggregate sfunc must be specified"))); -#ifdef PGXC - if (collectType == NULL) - ereport(ERROR, - (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate ctype must be specified"))); - if (collectfuncName == NIL) - ereport(ERROR, - (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate cfunc must be specified"))); - if (collectType != transType) - ereport(ERROR, - (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate ctype should be same as aggregate stype"))); - -#endif /* * look up the aggregate's input datatype(s). */ @@ -221,21 +202,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters) format_type_be(transTypeId)))); } -#ifdef PGXC - collectTypeId = typenameTypeId(NULL, collectType, NULL); - if (get_typtype(collectTypeId) == TYPTYPE_PSEUDO && - !IsPolymorphicType(collectTypeId)) - { - if (collectTypeId == INTERNALOID && superuser()) - /* okay */ ; - else - ereport(ERROR, - (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate transition data type cannot be %s", - format_type_be(collectTypeId)))); - } - -#endif /* * Most of the argument-checking is done inside of AggregateCreate */ diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 1a3b205..363a548 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -1137,6 +1137,7 @@ _copyAggref(Aggref *from) COPY_SCALAR_FIELD(aggtype); #ifdef PGXC COPY_SCALAR_FIELD(aggtrantype); + COPY_SCALAR_FIELD(agghas_collectfn); #endif /* PGXC */ COPY_NODE_FIELD(args); COPY_NODE_FIELD(aggorder); diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 01b0f51..1f6ac2d 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -185,6 +185,7 @@ _equalAggref(Aggref *a, Aggref *b) COMPARE_SCALAR_FIELD(aggtype); #ifdef PGXC COMPARE_SCALAR_FIELD(aggtrantype); + COMPARE_SCALAR_FIELD(agghas_collectfn); #endif /* PGXC */ COMPARE_NODE_FIELD(args); COMPARE_NODE_FIELD(aggorder); diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index d9dd1b8..bd10ba6 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -873,6 +873,7 @@ _outAggref(StringInfo str, Aggref *node) WRITE_OID_FIELD(aggtype); #ifdef PGXC WRITE_OID_FIELD(aggtrantype); + WRITE_BOOL_FIELD(agghas_collectfn); #endif /* PGXC */ WRITE_NODE_FIELD(args); WRITE_NODE_FIELD(aggorder); diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 6dccae9..36e989b 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -468,6 +468,7 @@ _readAggref(void) READ_OID_FIELD(aggtype); #ifdef PGXC READ_OID_FIELD(aggtrantype); + READ_BOOL_FIELD(agghas_collectfn); #endif /* PGXC */ READ_NODE_FIELD(args); READ_NODE_FIELD(aggorder); diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 19c8bd2..41c756b 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -5481,7 +5481,7 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist) if (aggref->aggorder || aggref->aggdistinct || aggref->agglevelsup || - !aggref->has_collectfn || + !aggref->agghas_collectfn || IsPolymorphicType(aggref->aggtrantype)) { shippable_remote_tlist = false; diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index 4846b09..e8bb6bb 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -204,7 +204,7 @@ transformAggregateCall(ParseState *pstate, Aggref *agg, agg->aggfnoid); aggform = (Form_pg_aggregate) GETSTRUCT(aggTuple); agg->aggtrantype = aggform->aggtranstype; - agg->has_collectfn = OidIsValid(aggform->aggcollectfn); + agg->agghas_collectfn = OidIsValid(aggform->aggcollectfn); if (IS_PGXC_DATANODE) agg->aggtype = agg->aggtrantype; diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index d0b6282..4e7a6d4 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -230,7 +230,7 @@ typedef struct Aggref Oid aggtype; /* type Oid of result of the aggregate */ #ifdef PGXC Oid aggtrantype; /* type Oid of transition results */ - bool has_collectfn; /* is collection function available */ + bool agghas_collectfn; /* is collection function available */ #endif /* PGXC */ List *args; /* arguments and sort expressions */ List *aggorder; /* ORDER BY (list of SortGroupClause) */ diff --git a/src/test/regress/expected/create_aggregate_1.out b/src/test/regress/expected/create_aggregate_1.out deleted file mode 100644 index a1afc03..0000000 --- a/src/test/regress/expected/create_aggregate_1.out +++ /dev/null @@ -1,73 +0,0 @@ --- --- CREATE_AGGREGATE --- --- all functions CREATEd -CREATE AGGREGATE newavg ( - sfunc = int4_avg_accum, basetype = int4, stype = _int8, - finalfunc = int8_avg, - initcond1 = '{0,0}' -); -ERROR: aggregate ctype must be specified --- test comments -COMMENT ON AGGREGATE newavg_wrong (int4) IS 'an agg comment'; -ERROR: aggregate newavg_wrong(integer) does not exist -COMMENT ON AGGREGATE newavg (int4) IS 'an agg comment'; -ERROR: aggregate newavg(integer) does not exist -COMMENT ON AGGREGATE newavg (int4) IS NULL; -ERROR: aggregate newavg(integer) does not exist --- without finalfunc; test obsolete spellings 'sfunc1' etc -CREATE AGGREGATE newsum ( - sfunc1 = int4pl, basetype = int4, stype1 = int4, - initcond1 = '0' -); -ERROR: aggregate ctype must be specified --- zero-argument aggregate -CREATE AGGREGATE newcnt (*) ( - sfunc = int8inc, stype = int8, - initcond = '0' -); -ERROR: aggregate ctype must be specified --- old-style spelling of same -CREATE AGGREGATE oldcnt ( - sfunc = int8inc, basetype = 'ANY', stype = int8, - initcond = '0' -); -ERROR: aggregate ctype must be specified --- aggregate that only cares about null/nonnull input -CREATE AGGREGATE newcnt ("any") ( - sfunc = int8inc_any, stype = int8, - initcond = '0' -); -ERROR: aggregate ctype must be specified -COMMENT ON AGGREGATE nosuchagg (*) IS 'should fail'; -ERROR: aggregate nosuchagg(*) does not exist -COMMENT ON AGGREGATE newcnt (*) IS 'an agg(*) comment'; -ERROR: aggregate newcnt(*) does not exist -COMMENT ON AGGREGATE newcnt ("any") IS 'an agg(any) comment'; -ERROR: aggregate newcnt("any") does not exist --- multi-argument aggregate -create function sum3(int8,int8,int8) returns int8 as -'select $1 + $2 + $3' language sql strict immutable; -create aggregate sum2(int8,int8) ( - sfunc = sum3, stype = int8, - initcond = '0' -); -ERROR: aggregate ctype must be specified --- multi-argument aggregates sensitive to distinct/order, strict/nonstrict -create type aggtype as (a integer, b integer, c text); -create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql strict immutable; -create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] -as 'select array_append($1,ROW($2,$3,$4)::aggtype)' -language sql immutable; -create aggregate aggfstr(integer,integer,text) ( - sfunc = aggf_trans, stype = aggtype[], - initcond = '{}' -); -ERROR: aggregate ctype must be specified -create aggregate aggfns(integer,integer,text) ( - sfunc = aggfns_trans, stype = aggtype[], - initcond = '{}' -); -ERROR: aggregate ctype must be specified diff --git a/src/test/regress/expected/polymorphism_1.out b/src/test/regress/expected/polymorphism_1.out index 008c399..774f935 100644 --- a/src/test/regress/expected/polymorphism_1.out +++ b/src/test/regress/expected/polymorphism_1.out @@ -76,28 +76,28 @@ CREATE FUNCTION ffnp(int[]) returns int[] as -- should CREATE CREATE AGGREGATE myaggp01a(*) (SFUNC = stfnp, STYPE = int4[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- P N -- should ERROR: stfnp(anyarray) not matched by stfnp(int[]) CREATE AGGREGATE myaggp02a(*) (SFUNC = stfnp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- N P -- should CREATE CREATE AGGREGATE myaggp03a(*) (SFUNC = stfp, STYPE = int4[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggp03b(*) (SFUNC = stfp, STYPE = int4[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- P P -- should ERROR: we have no way to resolve S CREATE AGGREGATE myaggp04a(*) (SFUNC = stfp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. CREATE AGGREGATE myaggp04b(*) (SFUNC = stfp, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- Case2 (R = P) && ((B = P) || (B = N)) -- ------------------------------------- -- S tf1 B tf2 @@ -106,106 +106,103 @@ ERROR: aggregate ctype must be specified -- should CREATE CREATE AGGREGATE myaggp05a(BASETYPE = int, SFUNC = tfnp, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N N N P -- should CREATE CREATE AGGREGATE myaggp06a(BASETYPE = int, SFUNC = tf2p, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N N P N -- should ERROR: tfnp(int[], anyelement) not matched by tfnp(int[], int) CREATE AGGREGATE myaggp07a(BASETYPE = anyelement, SFUNC = tfnp, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfnp(integer[], anyelement) does not exist -- N N P P -- should CREATE CREATE AGGREGATE myaggp08a(BASETYPE = anyelement, SFUNC = tf2p, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N P N N -- should CREATE CREATE AGGREGATE myaggp09a(BASETYPE = int, SFUNC = tf1p, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggp09b(BASETYPE = int, SFUNC = tf1p, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N P N P -- should CREATE CREATE AGGREGATE myaggp10a(BASETYPE = int, SFUNC = tfp, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggp10b(BASETYPE = int, SFUNC = tfp, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N P P N -- should ERROR: tf1p(int[],anyelement) not matched by tf1p(anyarray,int) CREATE AGGREGATE myaggp11a(BASETYPE = anyelement, SFUNC = tf1p, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf1p(integer[], anyelement) does not exist CREATE AGGREGATE myaggp11b(BASETYPE = anyelement, SFUNC = tf1p, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf1p(integer[], anyelement) does not exist -- N P P P -- should ERROR: tfp(int[],anyelement) not matched by tfp(anyarray,anyelement) CREATE AGGREGATE myaggp12a(BASETYPE = anyelement, SFUNC = tfp, STYPE = int[], FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfp(integer[], anyelement) does not exist CREATE AGGREGATE myaggp12b(BASETYPE = anyelement, SFUNC = tfp, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfp(integer[], anyelement) does not exist -- P N N N -- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int) CREATE AGGREGATE myaggp13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P N N P -- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement) CREATE AGGREGATE myaggp14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P N P N -- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int) CREATE AGGREGATE myaggp15a(BASETYPE = anyelement, SFUNC = tfnp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfnp(anyarray, anyelement) does not exist -- P N P P -- should ERROR: tf2p(anyarray, anyelement) not matched by tf2p(int[],anyelement) CREATE AGGREGATE myaggp16a(BASETYPE = anyelement, SFUNC = tf2p, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf2p(anyarray, anyelement) does not exist -- P P N N -- should ERROR: we have no way to resolve S CREATE AGGREGATE myaggp17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. CREATE AGGREGATE myaggp17b(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P P N P -- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement) CREATE AGGREGATE myaggp18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. CREATE AGGREGATE myaggp18b(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P P P N -- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int) CREATE AGGREGATE myaggp19a(BASETYPE = anyelement, SFUNC = tf1p, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf1p(anyarray, anyelement) does not exist CREATE AGGREGATE myaggp19b(BASETYPE = anyelement, SFUNC = tf1p, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf1p(anyarray, anyelement) does not exist -- P P P P -- should CREATE CREATE AGGREGATE myaggp20a(BASETYPE = anyelement, SFUNC = tfp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggp20b(BASETYPE = anyelement, SFUNC = tfp, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- Case3 (R = N) && (B = A) -- ------------------------ -- S tf1 @@ -214,28 +211,28 @@ ERROR: aggregate ctype must be specified -- should CREATE CREATE AGGREGATE myaggn01a(*) (SFUNC = stfnp, STYPE = int4[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggn01b(*) (SFUNC = stfnp, STYPE = int4[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- P N -- should ERROR: stfnp(anyarray) not matched by stfnp(int[]) CREATE AGGREGATE myaggn02a(*) (SFUNC = stfnp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. CREATE AGGREGATE myaggn02b(*) (SFUNC = stfnp, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- N P -- should CREATE CREATE AGGREGATE myaggn03a(*) (SFUNC = stfp, STYPE = int4[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- P P -- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) CREATE AGGREGATE myaggn04a(*) (SFUNC = stfp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- Case4 (R = N) && ((B = P) || (B = N)) -- ------------------------------------- -- S tf1 B tf2 @@ -244,110 +241,107 @@ ERROR: aggregate ctype must be specified -- should CREATE CREATE AGGREGATE myaggn05a(BASETYPE = int, SFUNC = tfnp, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggn05b(BASETYPE = int, SFUNC = tfnp, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N N N P -- should CREATE CREATE AGGREGATE myaggn06a(BASETYPE = int, SFUNC = tf2p, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggn06b(BASETYPE = int, SFUNC = tf2p, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N N P N -- should ERROR: tfnp(int[], anyelement) not matched by tfnp(int[], int) CREATE AGGREGATE myaggn07a(BASETYPE = anyelement, SFUNC = tfnp, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfnp(integer[], anyelement) does not exist CREATE AGGREGATE myaggn07b(BASETYPE = anyelement, SFUNC = tfnp, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfnp(integer[], anyelement) does not exist -- N N P P -- should CREATE CREATE AGGREGATE myaggn08a(BASETYPE = anyelement, SFUNC = tf2p, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified CREATE AGGREGATE myaggn08b(BASETYPE = anyelement, SFUNC = tf2p, STYPE = int[], INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N P N N -- should CREATE CREATE AGGREGATE myaggn09a(BASETYPE = int, SFUNC = tf1p, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N P N P -- should CREATE CREATE AGGREGATE myaggn10a(BASETYPE = int, SFUNC = tfp, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified -- N P P N -- should ERROR: tf1p(int[],anyelement) not matched by tf1p(anyarray,int) CREATE AGGREGATE myaggn11a(BASETYPE = anyelement, SFUNC = tf1p, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf1p(integer[], anyelement) does not exist -- N P P P -- should ERROR: tfp(int[],anyelement) not matched by tfp(anyarray,anyelement) CREATE AGGREGATE myaggn12a(BASETYPE = anyelement, SFUNC = tfp, STYPE = int[], FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfp(integer[], anyelement) does not exist -- P N N N -- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int) CREATE AGGREGATE myaggn13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. CREATE AGGREGATE myaggn13b(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P N N P -- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement) CREATE AGGREGATE myaggn14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. CREATE AGGREGATE myaggn14b(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P N P N -- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int) CREATE AGGREGATE myaggn15a(BASETYPE = anyelement, SFUNC = tfnp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfnp(anyarray, anyelement) does not exist CREATE AGGREGATE myaggn15b(BASETYPE = anyelement, SFUNC = tfnp, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tfnp(anyarray, anyelement) does not exist -- P N P P -- should ERROR: tf2p(anyarray, anyelement) not matched by tf2p(int[],anyelement) CREATE AGGREGATE myaggn16a(BASETYPE = anyelement, SFUNC = tf2p, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf2p(anyarray, anyelement) does not exist CREATE AGGREGATE myaggn16b(BASETYPE = anyelement, SFUNC = tf2p, STYPE = anyarray, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf2p(anyarray, anyelement) does not exist -- P P N N -- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) CREATE AGGREGATE myaggn17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P P N P -- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement) CREATE AGGREGATE myaggn18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: cannot determine transition data type +DETAIL: An aggregate using a polymorphic transition type must have at least one polymorphic argument. -- P P P N -- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int) CREATE AGGREGATE myaggn19a(BASETYPE = anyelement, SFUNC = tf1p, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function tf1p(anyarray, anyelement) does not exist -- P P P P -- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) CREATE AGGREGATE myaggn20a(BASETYPE = anyelement, SFUNC = tfp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: aggregate ctype must be specified +ERROR: function ffnp(anyarray) does not exist -- multi-arg polymorphic CREATE AGGREGATE mysum2(anyelement,anyelement) (SFUNC = sum3, STYPE = anyelement, INITCOND = '0'); -ERROR: aggregate ctype must be specified -- create test data for polymorphic aggregates create temp table t(f1 int, f2 int[], f3 text); ERROR: PG-XC does not yet support temporary tables @@ -534,24 +528,23 @@ create aggregate build_group(anyelement, integer) ( SFUNC = add_group, STYPE = anyarray ); -ERROR: aggregate ctype must be specified select build_group(q1,3) from int8_tbl; -ERROR: function build_group(bigint, integer) does not exist -LINE 1: select build_group(q1,3) from int8_tbl; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. + build_group +---------------------------- + {123,123,4567890123456789} +(1 row) + -- this should fail because stype isn't compatible with arg create aggregate build_group(int8, integer) ( SFUNC = add_group, STYPE = int2[] ); -ERROR: aggregate ctype must be specified +ERROR: function add_group(smallint[], bigint, integer) does not exist -- but we can make a non-poly agg from a poly sfunc if types are OK create aggregate build_group(int8, integer) ( SFUNC = add_group, STYPE = int8[] ); -ERROR: aggregate ctype must be specified -- check that we can apply functions taking ANYARRAY to pg_stats select distinct array_ndims(histogram_bounds) from pg_stats where histogram_bounds is not null; ----------------------------------------------------------------------- Summary of changes: src/backend/catalog/pg_aggregate.c | 48 +++++---- src/backend/commands/aggregatecmds.c | 34 ------ src/backend/nodes/copyfuncs.c | 1 + src/backend/nodes/equalfuncs.c | 1 + src/backend/nodes/outfuncs.c | 1 + src/backend/nodes/readfuncs.c | 1 + src/backend/optimizer/plan/createplan.c | 2 +- src/backend/parser/parse_agg.c | 2 +- src/include/nodes/primnodes.h | 2 +- src/test/regress/expected/create_aggregate_1.out | 73 ------------ src/test/regress/expected/polymorphism_1.out | 129 ++++++++++----------- 11 files changed, 94 insertions(+), 200 deletions(-) delete mode 100644 src/test/regress/expected/create_aggregate_1.out hooks/post-receive -- Postgres-XC |
From: Ashutosh B. <ash...@us...> - 2011-06-28 03:12:02
|
Project "Postgres-XC". The branch, master has been updated via 51355d7b7c7cde644fd754ace4e21b746840e4f9 (commit) from 1401d725b719ac2b6de45ace6e6bfd1a7413bc66 (commit) - Log ----------------------------------------------------------------- commit 51355d7b7c7cde644fd754ace4e21b746840e4f9 Author: Ashutosh Bapat <ash...@en...> Date: Tue Jun 28 08:05:39 2011 +0530 The commit fixes two issues FIRST If for an aggregate function, collection function does not exist, we need to collect the raw data from the data nodes and apply the transition and finalization phases of such an aggregate on coordinator itself, i.e. such an aggregate can not be pushed to the datanode. In PGXC, such aggregates are indicated by invalid collection function oid in pg_aggregate. In case of aggregates, array_agg and string_agg, the transition result type is 'internal'. These aggregates use internals structures such as ArrayBuildState and StringInfo resp. as transition results. The clients (in this case coordinator) can not handle transition results of 'internal' type. Hence setting invalid collection function oid for these aggregates. SECOND For aggregates which use polymorphic transition types, those polymorphic types need to be resolved before creating tuple descriptors for the remote query being pushed to the datanode with these types of aggregates. The polymorphic transition types are resolved during the execution phase where as the tuple descriptor is created at planning time. Hence for now, aggregates with polymorphic transition result types are not pushed to the datanodes. diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 215ed5f..bfcda98 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -532,6 +532,8 @@ advance_collection_function(AggState *aggstate, Datum newVal; MemoryContext oldContext; + Assert(OidIsValid(peraggstate->collectfn.fn_oid)); + /* * numArgument has to be one, since each datanode is going to send a single * transition value diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index a96619b..19c8bd2 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -5452,9 +5452,9 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist) /* * Walk through the target list and find out whether we can push the - * aggregates and grouping to datanodes. We can do so if the target list - * contains plain aggregates (without any expression involving those) and - * expressions in group by clauses only (last one to make the query legit. + * aggregates and grouping to datanodes. Also while doing so, create the + * targetlist for the query to be shipped to the datanode. Adjust the local + * targetlist accordingly. */ foreach(temp, *local_tlist) { @@ -5465,7 +5465,24 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist) if (IsA(expr, Aggref)) { Aggref *aggref = (Aggref *)expr; - if (aggref->aggorder || aggref->aggdistinct || aggref->agglevelsup) + /* + * If the aggregation needs tuples ordered specifically, or only + * accepts distinct values, we can not aggregate unless we have all + * the qualifying rows. Hence partial aggregation at data nodes can + * give wrong results. Hence we can not such aggregates to the + * datanodes. + * If there is no collection function, we can not combine the + * partial aggregation results from the data nodes, hence can not + * push such aggregate to the data nodes. + * PGXCTODO: If the transition type of the collection is polymorphic we + * need to resolve it first. That tells us the partial aggregation type + * expected from data node. + */ + if (aggref->aggorder || + aggref->aggdistinct || + aggref->agglevelsup || + !aggref->has_collectfn || + IsPolymorphicType(aggref->aggtrantype)) { shippable_remote_tlist = false; break; diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index 43a7974..4846b09 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -204,6 +204,7 @@ transformAggregateCall(ParseState *pstate, Aggref *agg, agg->aggfnoid); aggform = (Form_pg_aggregate) GETSTRUCT(aggTuple); agg->aggtrantype = aggform->aggtranstype; + agg->has_collectfn = OidIsValid(aggform->aggcollectfn); if (IS_PGXC_DATANODE) agg->aggtype = agg->aggtrantype; diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h index 5c2103c..f5ad8a9 100644 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@ -428,8 +428,7 @@ DATA(insert ( 2901 xmlconcat2 xmlconcat2 - 0 142 _null_ _null_ )); /* array */ #ifdef PGXC -/* PGXCTODO */ -//DATA(insert ( 2335 array_agg_transfn array_agg_finalfn 0 2281 _null_ )); +DATA(insert ( 2335 array_agg_transfn - array_agg_finalfn 0 2281 _null_ _null_ )); #endif #ifdef PGXC //DATA(insert ( 2335 array_agg_transfn array_agg_finalfn 0 2281 _null_ )); @@ -437,8 +436,8 @@ DATA(insert ( 2901 xmlconcat2 xmlconcat2 - 0 142 _null_ _null_ )); /* text */ #ifdef PGXC -//DATA(insert (3537 string_agg_transfn string_agg_finalfn 0 2281 _null_ )); -//DATA(insert (3538 string_agg_delim_transfn string_agg_finalfn 0 2281 _null_ )); +DATA(insert (3537 string_agg_transfn - string_agg_finalfn 0 2281 _null_ _null_ )); +DATA(insert (3538 string_agg_delim_transfn - string_agg_finalfn 0 2281 _null_ _null_ )); #endif /* diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index 8d38c24..d0b6282 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -230,6 +230,7 @@ typedef struct Aggref Oid aggtype; /* type Oid of result of the aggregate */ #ifdef PGXC Oid aggtrantype; /* type Oid of transition results */ + bool has_collectfn; /* is collection function available */ #endif /* PGXC */ List *args; /* arguments and sort expressions */ List *aggorder; /* ORDER BY (list of SortGroupClause) */ ----------------------------------------------------------------------- Summary of changes: src/backend/executor/nodeAgg.c | 2 ++ src/backend/optimizer/plan/createplan.c | 25 +++++++++++++++++++++---- src/backend/parser/parse_agg.c | 1 + src/include/catalog/pg_aggregate.h | 7 +++---- src/include/nodes/primnodes.h | 1 + 5 files changed, 28 insertions(+), 8 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-06-27 23:57:33
|
Project "Postgres-XC". The branch, master has been updated via 1401d725b719ac2b6de45ace6e6bfd1a7413bc66 (commit) from 805bb9aeb9aeddc8db1283e4724c108941785e8b (commit) - Log ----------------------------------------------------------------- commit 1401d725b719ac2b6de45ace6e6bfd1a7413bc66 Author: Michael P <mic...@us...> Date: Tue Jun 28 08:41:12 2011 +0900 Fix for bug 3324377: DBT-1 error with varchar This commit makes XC planner a little bit smarter for a query containing literal expression and parent-child expressions in where clauses. For SELECT queries of the type: SELECT * FROM table1,table2 WHERE table1 = 1 AND table2.column = table1.column; XC planner was trying to target more nodes than necessary by not completely analyze the parent-child join conditions. diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c index 52f3a0a..240e669 100644 --- a/src/backend/pgxc/plan/planner.c +++ b/src/backend/pgxc/plan/planner.c @@ -208,7 +208,7 @@ strpos(char *str, char *substr) * True if both lists contain only one node and are the same */ static bool -same_single_node (List *nodelist1, List *nodelist2) +same_single_node(List *nodelist1, List *nodelist2) { return nodelist1 && list_length(nodelist1) == 1 && nodelist2 && list_length(nodelist2) == 1 @@ -1096,46 +1096,6 @@ examine_conditions_walker(Node *expr_node, XCWalkerContext *context) if (!rel_loc_info1) return true; - /* Check if this constant expression is targetting multiple tables */ - if (list_length(context->query->rtable) > 1) - { - ListCell *lc; - RangeTblEntry *save_rte = NULL; - RelationLocInfo *save_loc_info; - - foreach(lc, context->query->rtable) - { - RangeTblEntry *rte = lfirst(lc); - - if (!save_rte) - { - save_rte = rte; - save_loc_info = GetRelationLocInfo(save_rte->relid); - } - else - { - /* - * If there are two distributed tables at least - * among the multiple tables, push down the query to all nodes. - */ - if (save_rte->relid != rte->relid) - { - RelationLocInfo *loc_info = GetRelationLocInfo(rte->relid); - - if (loc_info->locatorType != LOCATOR_TYPE_REPLICATED && - save_loc_info->locatorType != LOCATOR_TYPE_REPLICATED) - return true; - if (loc_info->locatorType != LOCATOR_TYPE_REPLICATED && - save_loc_info->locatorType == LOCATOR_TYPE_REPLICATED) - { - save_rte = rte; - save_loc_info = loc_info; - } - } - } - } - } - /* If hash or modulo partitioned, check if the part column was used */ if (IsHashColumn(rel_loc_info1, column_base->colname) || IsModuloColumn(rel_loc_info1, column_base->colname)) @@ -1361,7 +1321,8 @@ examine_conditions_walker(Node *expr_node, XCWalkerContext *context) if (save_exec_nodes->tableusagetype != TABLE_USAGE_TYPE_USER_REPLICATED) { /* See if they run on the same node */ - if (same_single_node (context->query_step->exec_nodes->nodelist, save_exec_nodes->nodelist)) + if (same_single_node(context->query_step->exec_nodes->nodelist, + save_exec_nodes->nodelist)) return false; } else @@ -1622,7 +1583,7 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) else { /* Allow if they are both using one node, and the same one */ - if (!same_single_node (from_query_nodes->nodelist, current_nodes->nodelist)) + if (!same_single_node(from_query_nodes->nodelist, current_nodes->nodelist)) /* Complicated */ return true; } @@ -1730,7 +1691,8 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) * If the query is rewritten (which can be due to rules or views), * ignore extra stuff. Also ignore subqueries we have processed */ - if ((!rte->inFromCl && query->commandType == CMD_SELECT) || rte->rtekind != RTE_RELATION) + if ((!rte->inFromCl && query->commandType == CMD_SELECT) || + rte->rtekind != RTE_RELATION) continue; /* PGXCTODO - handle RTEs that are functions */ @@ -1756,7 +1718,10 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) if (rel_loc_info->locatorType != LOCATOR_TYPE_HASH && rel_loc_info->locatorType != LOCATOR_TYPE_MODULO) /* do not need to determine partitioning expression */ - context->query_step->exec_nodes = GetRelationNodes(rel_loc_info, 0, UNKNOWNOID, context->accessType); + context->query_step->exec_nodes = GetRelationNodes(rel_loc_info, + 0, + UNKNOWNOID, + context->accessType); /* Note replicated table usage for determining safe queries */ if (context->query_step->exec_nodes) @@ -1765,9 +1730,12 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) table_usage_type = TABLE_USAGE_TYPE_USER_REPLICATED; context->query_step->exec_nodes->tableusagetype = table_usage_type; - } else if (context->conditions->partitioned_expressions) { + } + else if (context->conditions->partitioned_expressions) + { /* probably we can determine nodes on execution time */ - foreach(lc, context->conditions->partitioned_expressions) { + foreach(lc, context->conditions->partitioned_expressions) + { Expr_Comparison *expr_comp = (Expr_Comparison *) lfirst(lc); if (rel_loc_info->relid == expr_comp->relid) { @@ -1784,7 +1752,9 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) break; } } - } else { + } + else + { /* run query on all nodes */ context->query_step->exec_nodes = makeNode(ExecNodes); context->query_step->exec_nodes->baselocatortype = @@ -1802,9 +1772,56 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) /* check for partitioned col comparison against a literal */ else if (list_length(context->conditions->partitioned_literal_comps) > 0) { + bool is_single_node_safe = true; + context->query_step->exec_nodes = NULL; /* + * We may have a literal comparison with a parent-child join + * on a distributed table. In this case choose node targetting the column. + * But first check if it is targetting multiple distributed tables. + */ + if (list_length(context->query->rtable) > 1 && + !context->conditions->partitioned_parent_child) + { + ListCell *lc; + RangeTblEntry *save_rte = NULL; + RelationLocInfo *save_loc_info; + + foreach(lc, context->query->rtable) + { + RangeTblEntry *rte = lfirst(lc); + + if (!save_rte) + { + save_rte = rte; + save_loc_info = GetRelationLocInfo(save_rte->relid); + } + else + { + /* + * If there are two distributed tables at least + * among target tables, push down the query to all nodes. + */ + if (save_rte->relid != rte->relid) + { + RelationLocInfo *loc_info = GetRelationLocInfo(rte->relid); + + if (loc_info->locatorType != LOCATOR_TYPE_REPLICATED && + save_loc_info->locatorType != LOCATOR_TYPE_REPLICATED) + is_single_node_safe = false; + if (loc_info->locatorType != LOCATOR_TYPE_REPLICATED && + save_loc_info->locatorType == LOCATOR_TYPE_REPLICATED) + { + save_rte = rte; + save_loc_info = loc_info; + } + } + } + } + } + + /* * Make sure that if there are multiple such comparisons, that they * are all on the same nodes. */ @@ -1812,17 +1829,22 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) { Literal_Comparison *lit_comp = (Literal_Comparison *) lfirst(lc); - test_exec_nodes = GetRelationNodes(lit_comp->rel_loc_info, lit_comp->constValue, lit_comp->constType, RELATION_ACCESS_READ); + test_exec_nodes = GetRelationNodes(lit_comp->rel_loc_info, + lit_comp->constValue, + lit_comp->constType, + RELATION_ACCESS_READ); test_exec_nodes->tableusagetype = table_usage_type; - if (context->query_step->exec_nodes == NULL) + if (is_single_node_safe && + context->query_step->exec_nodes == NULL) context->query_step->exec_nodes = test_exec_nodes; else { - if (!same_single_node(context->query_step->exec_nodes->nodelist, test_exec_nodes->nodelist)) - { + if (context->query_step->exec_nodes == NULL || + !is_single_node_safe || + !same_single_node(context->query_step->exec_nodes->nodelist, + test_exec_nodes->nodelist)) return true; - } } } } @@ -1838,7 +1860,10 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) parent_child = (Parent_Child_Join *) linitial(context->conditions->partitioned_parent_child); - context->query_step->exec_nodes = GetRelationNodes(parent_child->rel_loc_info1, 0, UNKNOWNOID, context->accessType); + context->query_step->exec_nodes = GetRelationNodes(parent_child->rel_loc_info1, + 0, + UNKNOWNOID, + context->accessType); context->query_step->exec_nodes->tableusagetype = table_usage_type; } @@ -1853,7 +1878,8 @@ get_plan_nodes_walker(Node *query_node, XCWalkerContext *context) * same node */ else if (from_query_nodes->tableusagetype == TABLE_USAGE_TYPE_USER_REPLICATED - || (same_single_node(from_query_nodes->nodelist, context->query_step->exec_nodes->nodelist))) + || (same_single_node(from_query_nodes->nodelist, + context->query_step->exec_nodes->nodelist))) return false; else { @@ -2355,8 +2381,8 @@ make_simple_sort_from_sortclauses(Query *query, RemoteQuery *step) * been removed because of duplicate ORDER BY entry. Check original * DISTINCT clause, if expression is there continue iterating. * 3c. DISTINCT and ORDER BY are not compatible, emit error - * 4. DISTINCT and ORDER BY are compatible, if we have remaining items - * in the working copy we should append it to the order by list + * 4. DISTINCT and ORDER BY are compatible, if we have remaining items + * in the working copy we should append it to the order by list */ /* * Create the list of unique DISTINCT clause expressions @@ -2945,8 +2971,8 @@ free_query_step(RemoteQuery *query_step) * * RemoteQuery *innernode - the inner node * RemoteQuery *outernode - the outer node - * List *rtable_list - rtables - * JoinPath *join_path - used to examine join restrictions + * List *rtable_list - rtables + * JoinPath *join_path - used to examine join restrictions * PGXCJoinInfo *join_info - contains info about the join reduction * join_info->partitioned_replicated is set to true if we have a partitioned-replicated * join. We want to use replicated tables with non-replicated @@ -3199,7 +3225,10 @@ GetHashExecNodes(RelationLocInfo *rel_loc_info, ExecNodes **exec_nodes, const Ex constant = (Const *) checkexpr; /* single call handles both replicated and partitioned types */ - *exec_nodes = GetRelationNodes(rel_loc_info, constant->constvalue, constant->consttype, RELATION_ACCESS_INSERT); + *exec_nodes = GetRelationNodes(rel_loc_info, + constant->constvalue, + constant->consttype, + RELATION_ACCESS_INSERT); if (eval_expr) pfree(eval_expr); ----------------------------------------------------------------------- Summary of changes: src/backend/pgxc/plan/planner.c | 149 +++++++++++++++++++++++---------------- 1 files changed, 89 insertions(+), 60 deletions(-) hooks/post-receive -- Postgres-XC |