SET timezone TO 'Etc/UTC'; CREATE SERVER linkedgeodata FOREIGN DATA WRAPPER rdf_fdw OPTIONS (endpoint 'http://linkedgeodata.org/sparql'); CREATE FOREIGN TABLE hbf ( label text OPTIONS (variable '?label', language 'fr'), modified timestamp OPTIONS (variable '?modified', literaltype 'xsd:dateTime'), version bigint OPTIONS (variable '?version', literaltype 'xsd:int'), wheelchair boolean OPTIONS (variable '?wc', literaltype 'xsd:boolean'), lat numeric OPTIONS (variable '?lat'), lon numeric OPTIONS (variable '?lon'), type text OPTIONS (variable '?type', nodetype 'iri'), fake_string text OPTIONS (variable '?str', expression 'STRDT("foo",)', literaltype 'xsd:string'), fake_date date OPTIONS (variable '?dt', expression '"2018-05-01"^^xsd:date'), fake_time time OPTIONS (variable '?tm', expression '"T11:30:42"^^xsd:time'), fake_timetz timetz OPTIONS (variable '?tmtz', expression '"T14:45:13-05:00"^^xsd:time'), fake_timestamptz timestamptz OPTIONS (variable '?tstz', expression '"2011-01-10T14:45:13.815-05:00"^^xsd:dateTime') ) SERVER linkedgeodata OPTIONS ( log_sparql 'true', sparql ' SELECT * { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } '); /* SPARQL 17.4.1.7 - RDFterm-equal */ SELECT * FROM hbf WHERE label = 'Gare centrale de Leipzig' ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?label = "Gare centrale de Leipzig"@fr) } INFO: SPARQL returned 6 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz --------------------------+--------------------------+---------+------------+---------+---------+--------------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/meta/Node | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayStation | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/Station | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/PublicTransportThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (6 rows) /* SPARQL 17.4.1.9 - IN */ SELECT * FROM hbf WHERE label IN ('Leipzig Hbf', 'Gare centrale de Leipzig') ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?label IN ("Leipzig Hbf"@fr, "Gare centrale de Leipzig"@fr)) } INFO: SPARQL returned 6 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz --------------------------+--------------------------+---------+------------+---------+---------+--------------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/meta/Node | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayStation | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/Station | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/PublicTransportThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (6 rows) SELECT label, type FROM hbf WHERE label = ANY(ARRAY['Leipzig Hbf', 'Gare centrale de Leipzig']) ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?type { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?label IN ("Leipzig Hbf"@fr, "Gare centrale de Leipzig"@fr)) } INFO: SPARQL returned 6 records. label | type --------------------------+-------------------------------------------------------- Gare centrale de Leipzig | http://geovocab.org/spatial#Feature Gare centrale de Leipzig | http://linkedgeodata.org/ontology/RailwayThing Gare centrale de Leipzig | http://linkedgeodata.org/meta/Node Gare centrale de Leipzig | http://linkedgeodata.org/ontology/RailwayStation Gare centrale de Leipzig | http://linkedgeodata.org/ontology/Station Gare centrale de Leipzig | http://linkedgeodata.org/ontology/PublicTransportThing (6 rows) SELECT * FROM hbf WHERE fake_string IN ('Leipzig Hbf', 'Gare centrale de Leipzig') ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(STRDT("foo",) IN ("Leipzig Hbf"^^, "Gare centrale de Leipzig"^^)) } INFO: SPARQL returned 0 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------+----------+---------+------------+-----+-----+------+-------------+-----------+-----------+-------------+------------------ (0 rows) /* SPARQL 17.4.1.10 - NOT IN*/ SELECT * FROM hbf WHERE label NOT IN ('foo','bar') ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?label NOT IN ("foo"@fr, "bar"@fr)) } INFO: SPARQL returned 12 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz --------------------------+--------------------------+---------+------------+---------+---------+--------------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/PublicTransportThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/meta/Node | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayStation | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/Station | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/meta/Node | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayStation | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/Station | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/PublicTransportThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (12 rows) /* SPARQL 15.5 - LIMIT */ SELECT * FROM hbf ORDER BY label COLLATE "C" LIMIT 1; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 1 INFO: SPARQL returned 1 record. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+-------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (1 row) SELECT * FROM hbf ORDER BY label COLLATE "C" FETCH FIRST ROW ONLY; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 1 INFO: SPARQL returned 1 record. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+-------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (1 row) SELECT * FROM hbf ORDER BY label COLLATE "C" FETCH FIRST 2 ROWS ONLY; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 2 INFO: SPARQL returned 2 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (2 rows) /* SPARQL 15.4 - OFFSET */ SELECT * FROM hbf ORDER BY label COLLATE "C" OFFSET 1 LIMIT 1; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 2 INFO: SPARQL returned 2 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (1 row) SELECT * FROM hbf ORDER BY label COLLATE "C" OFFSET 1 FETCH FIRST ROW ONLY; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 2 INFO: SPARQL returned 2 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (1 row) /* SPARQL 15.1 - ORDER BY */ SELECT * FROM hbf ORDER BY label COLLATE "C" ASC LIMIT 2; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 2 INFO: SPARQL returned 2 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (2 rows) SELECT * FROM hbf ORDER BY label COLLATE "C" DESC LIMIT 2; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 2 INFO: SPARQL returned 2 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (2 rows) SELECT * FROM hbf ORDER BY label COLLATE "C" ASC, type COLLATE "C" DESC LIMIT 3; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } LIMIT 3 INFO: SPARQL returned 3 records. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz -------------+--------------------------+---------+------------+---------+---------+------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayThing | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/meta/Node | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://geovocab.org/spatial#Feature | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (3 rows) /* SPARQL 18.2.5.3 - DISTINCT*/ SELECT DISTINCT label COLLATE "C", modified FROM hbf ORDER BY label COLLATE "C", modified; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } INFO: SPARQL returned 2 records. label | modified --------------------------+-------------------------- Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 Leipzig Hbf | Sun Jul 12 20:41:25 2015 (2 rows) SELECT DISTINCT ON (label COLLATE "C", modified) label, modified, version FROM hbf ORDER BY label COLLATE "C", modified; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) } INFO: SPARQL returned 12 records. label | modified | version --------------------------+--------------------------+--------- Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 (2 rows) /* SPARQL - 17.3 Operator Mapping (pgtypes) */ SELECT * FROM hbf WHERE label = 'Gare centrale de Leipzig' AND modified = '2015-07-12 20:41:25'::timestamp AND wheelchair IS true AND version = 19 AND type = 'http://linkedgeodata.org/ontology/RailwayStation'::varchar AND fake_timestamptz = '2011-01-10 14:45:13.815-05:00'::timestamptz AND fake_date = '2018-05-01'::date AND fake_string = 'foo' ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("T11:30:42"^^xsd:time AS ?tm) ("T14:45:13-05:00"^^xsd:time AS ?tmtz) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?wc = "true"^^) FILTER(?label = "Gare centrale de Leipzig"@fr) FILTER(?modified = "2015-07-12T20:41:25"^^) FILTER(?version = 19) FILTER(?type = IRI("http://linkedgeodata.org/ontology/RailwayStation")) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime = "2011-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date = "2018-05-01"^^) FILTER(STRDT("foo",) = "foo"^^) } INFO: SPARQL returned 1 record. label | modified | version | wheelchair | lat | lon | type | fake_string | fake_date | fake_time | fake_timetz | fake_timestamptz --------------------------+--------------------------+---------+------------+---------+---------+--------------------------------------------------+-------------+------------+-----------+-------------+---------------------------------- Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | t | 51.3466 | 12.3831 | http://linkedgeodata.org/ontology/RailwayStation | foo | 05-01-2018 | 11:30:42 | 14:45:13-05 | Mon Jan 10 19:45:13.815 2011 UTC (1 row) SELECT DISTINCT label COLLATE "C", modified, version, lat, lon, fake_timestamptz, fake_date FROM hbf WHERE label <> 'foo' AND modified <> '2020-07-12 20:41:25'::timestamp AND wheelchair IS NOT false AND version <> 99 AND lat <> 99 AND lon <> 99 AND type <> 'http://linkedgeodata.org/ontology/RailwayStation'::varchar AND fake_timestamptz <> '2020-01-10 14:45:13.815-05:00'::timestamptz AND fake_date <> '2020-05-01'::date AND fake_string <> 'bar' ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified ?version ?wc ?lat ?lon ?type (STRDT("foo",) AS ?str) ("2018-05-01"^^xsd:date AS ?dt) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?label != "foo"@fr) FILTER(?modified != "2020-07-12T20:41:25"^^) FILTER(?wc != "false"^^) FILTER(?version != 99) FILTER(?lat != 99) FILTER(?lon != 99) FILTER(?type != IRI("http://linkedgeodata.org/ontology/RailwayStation")) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime != "2020-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date != "2020-05-01"^^) FILTER(STRDT("foo",) != "bar"^^) } INFO: SPARQL returned 10 records. label | modified | version | lat | lon | fake_timestamptz | fake_date --------------------------+--------------------------+---------+---------+---------+----------------------------------+------------ Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 (2 rows) SELECT DISTINCT label COLLATE "C", modified, version, lat, lon, fake_timestamptz, fake_date FROM hbf WHERE modified > '2014-07-12 20:41:25'::timestamp AND version > 01 AND lat > 01 AND lon > 01 AND fake_timestamptz > '2010-01-10 14:45:13.815-05:00'::timestamptz AND fake_date > '2017-05-01'::date ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified ?version ?lat ?lon ("2018-05-01"^^xsd:date AS ?dt) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?modified > "2014-07-12T20:41:25"^^) FILTER(?version > 1) FILTER(?lat > 1) FILTER(?lon > 1) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime > "2010-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date > "2017-05-01"^^) } INFO: SPARQL returned 2 records. label | modified | version | lat | lon | fake_timestamptz | fake_date --------------------------+--------------------------+---------+---------+---------+----------------------------------+------------ Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 (2 rows) SELECT DISTINCT label COLLATE "C", modified, version, lat, lon, fake_timestamptz, fake_date FROM hbf WHERE modified < '2016-07-12 20:41:25'::timestamp AND version < 99 AND lat < 99 AND lon < 99 AND fake_timestamptz < '2012-01-10 14:45:13.815-05:00'::timestamptz AND fake_date < '2019-05-01'::date ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified ?version ?lat ?lon ("2018-05-01"^^xsd:date AS ?dt) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?modified < "2016-07-12T20:41:25"^^) FILTER(?version < 99) FILTER(?lat < 99) FILTER(?lon < 99) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime < "2012-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date < "2019-05-01"^^) } INFO: SPARQL returned 2 records. label | modified | version | lat | lon | fake_timestamptz | fake_date --------------------------+--------------------------+---------+---------+---------+----------------------------------+------------ Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 (2 rows) SELECT DISTINCT label COLLATE "C", modified, version, lat, lon, fake_timestamptz, fake_date FROM hbf WHERE modified >= '2015-07-12 20:41:25'::timestamp AND version >= 19 AND fake_timestamptz >= '2011-01-10 14:45:13.815-05:00'::timestamptz AND fake_date >= '2018-05-01'::date AND fake_timestamptz >= '2011-01-10 14:45:13.815-05:00'::timestamptz AND fake_date >= '2018-05-01'::date ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified ?version ?lat ?lon ("2018-05-01"^^xsd:date AS ?dt) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?modified >= "2015-07-12T20:41:25"^^) FILTER(?version >= 19) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime >= "2011-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date >= "2018-05-01"^^) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime >= "2011-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date >= "2018-05-01"^^) } INFO: SPARQL returned 2 records. label | modified | version | lat | lon | fake_timestamptz | fake_date --------------------------+--------------------------+---------+---------+---------+----------------------------------+------------ Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 (2 rows) SELECT DISTINCT label COLLATE "C", modified, version, lat, lon, fake_timestamptz, fake_date FROM hbf WHERE modified <= '2015-07-12 20:41:25'::timestamp AND version <= 19 AND fake_timestamptz <= '2011-01-10 14:45:13.815-05:00'::timestamptz AND fake_date <= '2018-05-01'::date AND fake_timestamptz <= '2011-01-10 14:45:13.815-05:00'::timestamptz AND fake_date <= '2018-05-01'::date ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified ?version ?lat ?lon ("2018-05-01"^^xsd:date AS ?dt) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?modified <= "2015-07-12T20:41:25"^^) FILTER(?version <= 19) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime <= "2011-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date <= "2018-05-01"^^) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime <= "2011-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date <= "2018-05-01"^^) } INFO: SPARQL returned 2 records. label | modified | version | lat | lon | fake_timestamptz | fake_date --------------------------+--------------------------+---------+---------+---------+----------------------------------+------------ Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 (2 rows) SELECT DISTINCT label COLLATE "C", modified, version, lat, lon, fake_timestamptz, fake_date FROM hbf WHERE modified BETWEEN '2014-07-12 20:41:25'::timestamp AND '2016-07-12 20:41:25'::timestamp AND version BETWEEN 17 AND 20 AND fake_timestamptz BETWEEN '2010-01-10 14:45:13.815-05:00'::timestamptz AND '2012-01-10 14:45:13.815-05:00'::timestamptz AND fake_date BETWEEN '2017-05-01'::date AND '2019-05-01'::date AND fake_timestamptz BETWEEN '2010-01-10 14:45:13.815-05:00'::timestamptz AND '2012-01-10 14:45:13.815-05:00'::timestamptz AND fake_date BETWEEN '2017-05-01'::date AND '2019-05-01'::date ORDER BY label COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified ?version ?lat ?lon ("2018-05-01"^^xsd:date AS ?dt) ("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime AS ?tstz) { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(?modified >= "2014-07-12T20:41:25"^^) FILTER(?modified <= "2016-07-12T20:41:25"^^) FILTER(?version >= 17) FILTER(?version <= 20) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime >= "2010-01-10T19:45:13.815000Z"^^) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime <= "2012-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date >= "2017-05-01"^^) FILTER("2018-05-01"^^xsd:date <= "2019-05-01"^^) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime >= "2010-01-10T19:45:13.815000Z"^^) FILTER("2011-01-10T14:45:13.815-05:00"^^xsd:dateTime <= "2012-01-10T19:45:13.815000Z"^^) FILTER("2018-05-01"^^xsd:date >= "2017-05-01"^^) FILTER("2018-05-01"^^xsd:date <= "2019-05-01"^^) } INFO: SPARQL returned 2 records. label | modified | version | lat | lon | fake_timestamptz | fake_date --------------------------+--------------------------+---------+---------+---------+----------------------------------+------------ Gare centrale de Leipzig | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 Leipzig Hbf | Sun Jul 12 20:41:25 2015 | 19 | 51.3466 | 12.3831 | Mon Jan 10 19:45:13.815 2011 UTC | 05-01-2018 (2 rows) /* pushdown - PostgreSQL length */ SELECT label, type FROM hbf WHERE length(label) = 24 AND length(label) <> 1 AND length(label) < 99 AND length(label) <= 24 AND length(label) >= 24 AND length(label) BETWEEN 10 AND 88 ORDER BY label COLLATE "C", type COLLATE "C"; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?label ?type { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(STRLEN(?label) != 1) FILTER(STRLEN(?label) < 99) FILTER(STRLEN(?label) <= 24) FILTER(STRLEN(?label) >= 24) FILTER(STRLEN(?label) >= 10) FILTER(STRLEN(?label) <= 88) FILTER(STRLEN(?label) = 24) } INFO: SPARQL returned 6 records. label | type --------------------------+-------------------------------------------------------- Gare centrale de Leipzig | http://geovocab.org/spatial#Feature Gare centrale de Leipzig | http://linkedgeodata.org/meta/Node Gare centrale de Leipzig | http://linkedgeodata.org/ontology/PublicTransportThing Gare centrale de Leipzig | http://linkedgeodata.org/ontology/RailwayStation Gare centrale de Leipzig | http://linkedgeodata.org/ontology/RailwayThing Gare centrale de Leipzig | http://linkedgeodata.org/ontology/Station (6 rows) /* pushdown - PostgreSQL abs */ SELECT DISTINCT label COLLATE "C", abs(version) FROM hbf WHERE abs(version) = 19 AND abs(version) > 01 AND abs(version) >= 19 AND abs(version) < 99 AND abs(version) <= 19 AND abs(version) BETWEEN 01 AND 99 ORDER BY label COLLATE "C", abs(version); INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?version { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(ABS(?version) > 1) FILTER(ABS(?version) >= 19) FILTER(ABS(?version) < 99) FILTER(ABS(?version) <= 19) FILTER(ABS(?version) >= 1) FILTER(ABS(?version) <= 99) FILTER(ABS(?version) = 19) } INFO: SPARQL returned 2 records. label | abs --------------------------+----- Gare centrale de Leipzig | 19 Leipzig Hbf | 19 (2 rows) /* pushdown - PostgreSQL round */ SELECT DISTINCT label COLLATE "C", round(lat) FROM hbf WHERE round(lat) = 51 AND round(lat) > 01 AND round(lat) >= 51 AND round(lat) < 99 AND round(lat) <= 51 AND round(lat) BETWEEN 01 AND 99 ORDER BY label COLLATE "C", round(lat); INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?lat { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(ROUND(?lat) > 1) FILTER(ROUND(?lat) >= 51) FILTER(ROUND(?lat) < 99) FILTER(ROUND(?lat) <= 51) FILTER(ROUND(?lat) >= 1) FILTER(ROUND(?lat) <= 99) FILTER(ROUND(?lat) = 51) } INFO: SPARQL returned 2 records. label | round --------------------------+------- Gare centrale de Leipzig | 51 Leipzig Hbf | 51 (2 rows) /* pushdown - PostgreSQL ceil */ SELECT DISTINCT label COLLATE "C", ceil(lat) FROM hbf WHERE ceil(lat) = 52 AND ceil(lat) > 01 AND ceil(lat) >= 52 AND ceil(lat) < 99 AND ceil(lat) <= 52 AND ceil(lat) BETWEEN 01 AND 99 ORDER BY label COLLATE "C", ceil(lat); INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?lat { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(CEIL(?lat) > 1) FILTER(CEIL(?lat) >= 52) FILTER(CEIL(?lat) < 99) FILTER(CEIL(?lat) <= 52) FILTER(CEIL(?lat) >= 1) FILTER(CEIL(?lat) <= 99) FILTER(CEIL(?lat) = 52) } INFO: SPARQL returned 2 records. label | ceil --------------------------+------ Gare centrale de Leipzig | 52 Leipzig Hbf | 52 (2 rows) /* pushdown - PostgreSQL floor */ SELECT DISTINCT label COLLATE "C", floor(lat) FROM hbf WHERE floor(lat) = 51 AND floor(lat) > 01 AND floor(lat) >= 51 AND floor(lat) < 99 AND floor(lat) <= 51 AND floor(lat) BETWEEN 01 AND 99 ORDER BY label COLLATE "C", floor(lat); INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?lat { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(FLOOR(?lat) > 1) FILTER(FLOOR(?lat) >= 51) FILTER(FLOOR(?lat) < 99) FILTER(FLOOR(?lat) <= 51) FILTER(FLOOR(?lat) >= 1) FILTER(FLOOR(?lat) <= 99) FILTER(FLOOR(?lat) = 51) } INFO: SPARQL returned 2 records. label | floor --------------------------+------- Gare centrale de Leipzig | 51 Leipzig Hbf | 51 (2 rows) /* pushdown - PostgreSQL substring */ SELECT DISTINCT label, modified FROM hbf WHERE substring(label,1,7) = 'Leipzig'; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label ?modified { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(SUBSTR(?label, 1, 7) = "Leipzig") } ORDER BY ASC (?label) ASC (?modified) INFO: SPARQL returned 1 record. label | modified -------------+-------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 (1 row) /* pushdown - PostgreSQL extract */ ALTER FOREIGN TABLE hbf OPTIONS (SET log_sparql 'false'); SELECT label, modified FROM hbf WHERE EXTRACT(year FROM modified) = 2015 AND EXTRACT(month FROM modified) = 07 AND EXTRACT(days FROM modified) = 12 AND EXTRACT(hours FROM modified) = 20 AND EXTRACT(minutes FROM modified) = 41 AND EXTRACT(seconds FROM modified) = 25 FETCH FIRST ROW ONLY; label | modified -------------+-------------------------- Leipzig Hbf | Sun Jul 12 20:41:25 2015 (1 row) ALTER FOREIGN TABLE hbf OPTIONS (SET log_sparql 'true'); /* pushdown - PostgreSQL md5 */ SELECT DISTINCT label, md5(label) FROM hbf WHERE md5(label) = '0ef548c961d447732b145dc39df17df4'; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT DISTINCT ?label { ?s ?label . ?s ?modified . ?s ?version . ?s ?wc . ?s ?lat . ?s ?lon . ?s ?type FILTER(?s = ) ## rdf_fdw pushdown conditions ## FILTER(MD5(?label) = "0ef548c961d447732b145dc39df17df4") } ORDER BY ASC (?label) INFO: SPARQL returned 1 record. label | md5 --------------------------+---------------------------------- Gare centrale de Leipzig | 0ef548c961d447732b145dc39df17df4 (1 row) /* non-pushable query (MINUS) */ CREATE FOREIGN TABLE hbf_np1 ( p text OPTIONS (variable '?p'), o text OPTIONS (variable '?o') ) SERVER linkedgeodata OPTIONS ( log_sparql 'true', sparql ' PREFIX dc: SELECT * WHERE { ?p ?o MINUS { dc:modified ?o} } '); SELECT * FROM hbf_np1 WHERE p = 'http://linkedgeodata.org/ontology/operator'; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': PREFIX dc: SELECT * WHERE { ?p ?o MINUS { dc:modified ?o} } INFO: SPARQL returned 24 records. p | o --------------------------------------------+----------------------- http://linkedgeodata.org/ontology/operator | DB Station&Service AG (1 row) /* non-pushable query (UNION) */ CREATE FOREIGN TABLE hbf_np2 ( p text OPTIONS (variable '?p'), o text OPTIONS (variable '?o') ) SERVER linkedgeodata OPTIONS ( log_sparql 'true', sparql ' PREFIX dc: SELECT * WHERE { { ?p ?o} UNION { dc:modified ?o} } '); SELECT * FROM hbf_np2 WHERE p = 'http://geovocab.org/geometry#geometry'; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': PREFIX dc: SELECT * WHERE { { ?p ?o} UNION { dc:modified ?o} } INFO: SPARQL returned 26 records. p | o ---------------------------------------+------------------------------------------------- http://geovocab.org/geometry#geometry | http://linkedgeodata.org/geometry/node376142577 (1 row) /* non-pushable quer (LIMIT) */ CREATE FOREIGN TABLE hbf_np3 ( p text OPTIONS (variable '?p'), o text OPTIONS (variable '?o') ) SERVER linkedgeodata OPTIONS ( log_sparql 'true', sparql 'SELECT * WHERE { ?p ?o} LIMIT 10'); SELECT * FROM hbf_np3 WHERE p = 'http://www.w3.org/2000/01/rdf-schema#label'; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT * WHERE { ?p ?o} LIMIT 10 INFO: SPARQL returned 10 records. p | o --------------------------------------------+-------------------------- http://www.w3.org/2000/01/rdf-schema#label | Leipzig Hbf http://www.w3.org/2000/01/rdf-schema#label | Gare centrale de Leipzig (2 rows) /* non-pushable quer (ORDER BY) */ CREATE FOREIGN TABLE hbf_np4 ( p text OPTIONS (variable '?p'), o text OPTIONS (variable '?o') ) SERVER linkedgeodata OPTIONS ( log_sparql 'true', sparql 'SELECT * WHERE { ?p ?o} ORDER BY ?o'); SELECT * FROM hbf_np4 WHERE p = 'http://www.w3.org/2000/01/rdf-schema#label'; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT * WHERE { ?p ?o} ORDER BY ?o INFO: SPARQL returned 25 records. p | o --------------------------------------------+-------------------------- http://www.w3.org/2000/01/rdf-schema#label | Leipzig Hbf http://www.w3.org/2000/01/rdf-schema#label | Gare centrale de Leipzig (2 rows) /* non-pushable quer (GROUP BY) */ CREATE FOREIGN TABLE hbf_np5 ( p text OPTIONS (variable '?p'), c int OPTIONS (variable '?c') ) SERVER linkedgeodata OPTIONS ( log_sparql 'true', sparql 'SELECT ?p (count(?o) AS ?c) WHERE { ?p ?o} GROUP BY ?p'); SELECT * FROM hbf_np5 WHERE p = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' AND c > 1; INFO: SPARQL query sent to 'http://linkedgeodata.org/sparql': SELECT ?p (count(?o) AS ?c) WHERE { ?p ?o} GROUP BY ?p INFO: SPARQL returned 19 records. p | c -------------------------------------------------+--- http://www.w3.org/1999/02/22-rdf-syntax-ns#type | 6 (1 row) DROP SERVER linkedgeodata CASCADE; NOTICE: drop cascades to 6 other objects DETAIL: drop cascades to foreign table hbf drop cascades to foreign table hbf_np1 drop cascades to foreign table hbf_np2 drop cascades to foreign table hbf_np3 drop cascades to foreign table hbf_np4 drop cascades to foreign table hbf_np5