|
From: Javier H. <jhe...@ce...> - 2013-06-25 17:34:30
|
Hello,
============================================================================
POSTGRES-XC BUG REPORT TEMPLATE
============================================================================
Your name : Javier Hernandez
Your email address : jhe...@ce...
System Configuration:
---------------------
Architecture : Intel Xeon
Operating System : Debian 6.0.7
Postgres-XC version : Postgres-XC 1.0.3
Compiler used : gcc 4.4.5
Please enter a FULL description of your problem:
------------------------------------------------
When I execute a SELECT count(*) aggregate function inside a query defined in a CURSOR returns incorrect values. It seems that returns the number of data nodes instead of computing the aggregate.
(May is related with Bug*#3603394*, sorry for the guess)
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
audit=# select * from pgxc_node;
node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id
-----------+-----------+-----------+---------------+----------------+------------------+-------------
coord1 | C | 5432 | localhost | f | f | 1885696643
datanode1 | D | 54321 | localhost | f | f | 888802358
datanode3 | D | 54322 | localhost | f | f | -1894792127
datanode4 | D | 54322 | 192.168.56.61 | f | f | -1307323892
datanode2 | D | 54321 | 192.168.56.61 | f | f | -905831925
(5 rows)
audit=# CREATE TABLE test_count (val INTEGER, name VARCHAR(39);
audit=# INSERT INTO test_count VALUES (1, 'uno'), (2, 'dos');
INSERT 0 2
audit=# BEGIN;
BEGIN
audit=# DECLARE cde CURSOR FOR SELECT count(*) FROM test_count;
DECLARE CURSOR
audit=# fetch ALL from cde;
count
-------
4
(1 row)
audit=# fetch ALL from cde;
count
-------
(0 rows)
audit=# COMMIT;
COMMIT
Expected result is 2.
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------*
Sorry!
Thanks,
--
Javier Hernández
Ingeniero de Bases de Datos
Centro de Estudios de Fisica del Cosmos de Aragon (ceFca)
http://www.cefca.es
Plza San Juan Nº 1, Planta 2ª
E-44001 Teruel (Spain)
Phone: +34 978 221266 Ext.1105
Fax: +34 978 611801
|