|
From: Koichi S. <koi...@gm...> - 2013-06-26 01:43:08
|
Hi, Javier;
Thank you very much for the report. I found the issue has been fixed in
the current head which will be available as 1.1 soon.
Please see the result.
----8<------------8<-----------
psql (PGXC 1.1devel, based on PG 9.2beta2)
Type "help" for help.
koichi=# CREATE TABLE test_count (val INTEGER, name VARCHAR(39));
CREATE TABLE
koichi=# INSERT INTO test_count VALUES (1, 'uno'), (2, 'dos');
INSERT 0 2
koichi=# begin;
BEGIN
koichi=# DECLARE cde CURSOR FOR SELECT count(*) FROM test_count;
DECLARE CURSOR
koichi=#
koichi=# fetch ALL from cde;
count
-------
2
(1 row)
koichi=# fetch ALL from cde;
count
-------
(0 rows)
koichi=# COMMIT;
COMMIT
koichi=#
---->8------------>8-----------
Regards;
----------
Koichi Suzuki
2013/6/26 Javier Hernandez <jhe...@ce...>
> 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
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Postgres-xc-bugs mailing list
> Pos...@li...
> https://lists.sourceforge.net/lists/listinfo/postgres-xc-bugs
>
>
|