Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaUco-0001c7-Lv for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Sep 2015 20:08:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZaUco-0008GZ-8S for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Sep 2015 20:08:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZaUcB-0006oP-16 for pgsql-bugs@postgresql.org; Fri, 11 Sep 2015 20:08:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZaUc7-00048d-Pr for pgsql-bugs@postgresql.org; Fri, 11 Sep 2015 20:08:06 +0000 MIME-Version: 1.0 Subject: BUG #13616: MySQL FDW Geometry Not Returning All Records To: pgsql-bugs@postgresql.org From: ryan.king@noaa.gov Date: Fri, 11 Sep 2015 20:07:53 +0000 Message-ID: <20150911200753.363.73990@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13616 Logged by: Ryan King Email address: ryan.king@noaa.gov PostgreSQL version: 9.4.4 Operating system: Red Hat 4.4.7-11), 64-bit Description: Not all the records return when selecting geom columns: select * from public.public_zones --only 54 records return select polygon_column from public.public_zones --only 54 records return select OGR_FID from public.public_zones --all 3000 records return select name from public.public_zones --all 3000 records return These are the steps I took to create the FDW: MySQL: CREATE TABLE `public_zones` ( `OGR_FID` int(11) NOT NULL AUTO_INCREMENT, `polygon_column` geometry NOT NULL, `name` varchar(254) DEFAULT NULL, UNIQUE KEY `OGR_FID` (`OGR_FID`), SPATIAL KEY `polygon_column` (`polygon_column`) ) ENGINE=MyISAM AUTO_INCREMENT=18519 DEFAULT CHARSET=latin1; CREATE VIEW `public_zones_view` AS select `public_zones`.`OGR_FID` AS `OGR_FID`,st_astext(`public_zones`.`polygon_column`) AS `polygon_column`, `public_zones`.`name` AS `name` from `public_zones`; PostgreSQL: CREATE EXTENSION mysql_fdw; CREATE FOREIGN DATA WRAPPER mysql_fdw_db1 HANDLER mysql_fdw_handler VALIDATOR mysql_fdw_validator; CREATE SERVER mysql_svr_db1 FOREIGN DATA WRAPPER mysql_fdw_db1 OPTIONS (host 'IPADDRESS', port '3306'); CREATE USER MAPPING FOR username SERVER mysql_svr_db1 OPTIONS (username 'username', password 'password'); CREATE FOREIGN TABLE table_name ( OGR_FID SERIAL NOT NULL, polygon_column public.geometry NOT NULL, name varchar(254) DEFAULT NULL, SERVER mysql_svr_db1 OPTIONS (dbname 'mysqldbname', table_name 'table_name_view'); I read a post that there was a bug in PostGIS 2.1.0 preventing foreign tables from being output in geometry_columns and geography_columns views and was supposed to be fixed in PostGIS 2.1.1. We are on 2.1.8. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs