chore: increase complexity of the SQL table test (#1256)

a few more characters that have to be properly escaped
This commit is contained in:
Yuri Astrakhan 2024-03-16 04:23:35 -04:00 committed by GitHub
parent 7d1763f827
commit 9505a2107e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 27 additions and 40 deletions

View File

@ -60,7 +60,7 @@ postgres:
"-function.withweired---_-characters":
content_type: application/x-protobuf
description: a function source with special characters
".-Points---quote":
".-Points-----------quote":
content_type: application/x-protobuf
description: Escaping test table
MixPoints:

View File

@ -21,7 +21,7 @@ async fn table_source() {
"-function.withweired---_-characters":
content_type: application/x-protobuf
description: a function source with special characters
".-Points---quote":
".-Points-----------quote":
content_type: application/x-protobuf
description: Escaping test table
MixPoints:

View File

@ -4,7 +4,7 @@
"content_type": "application/x-protobuf",
"description": "a function source with special characters"
},
".-Points---quote": {
".-Points-----------quote": {
"content_type": "application/x-protobuf",
"description": "Escaping test table"
},

View File

@ -4,11 +4,11 @@ postgres:
auto_bounds: calc
auto_publish: true
tables:
.-Points---quote:
schema: '"Quotes'' and Space.Dot.'
table: . Points" 'quote
.-Points-----------quote:
schema: '"Quotes'' \ \'' \" and Space.Dot.'
table: . Points" \ \' \" 'quote
srid: 4326
geometry_column: . "Geom"
geometry_column: . ' \ \' \" "Geom"
bounds:
- -170.94984639004662
- -84.20025580733805

View File

@ -3,11 +3,11 @@ postgres:
auto_bounds: calc
auto_publish: true
tables:
.-Points---quote:
schema: '"Quotes'' and Space.Dot.'
table: . Points" 'quote
.-Points-----------quote:
schema: '"Quotes'' \ \'' \" and Space.Dot.'
table: . Points" \ \' \" 'quote
srid: 4326
geometry_column: . "Geom"
geometry_column: . ' \ \' \" "Geom"
bounds:
- -170.94984639004662
- -84.20025580733805

View File

@ -3,11 +3,11 @@ postgres:
auto_bounds: calc
auto_publish: true
tables:
.-Points---quote:
schema: '"Quotes'' and Space.Dot.'
table: . Points" 'quote
.-Points-----------quote:
schema: '"Quotes'' \ \'' \" and Space.Dot.'
table: . Points" \ \' \" 'quote
srid: 4326
geometry_column: . "Geom"
geometry_column: . ' \ \' \" "Geom"
bounds:
- -170.94984639004662
- -84.20025580733805

View File

@ -3,11 +3,11 @@ postgres:
auto_bounds: calc
auto_publish: true
tables:
.-Points---quote:
schema: '"Quotes'' and Space.Dot.'
table: . Points" 'quote
.-Points-----------quote:
schema: '"Quotes'' \ \'' \" and Space.Dot.'
table: . Points" \ \' \" 'quote
srid: 4326
geometry_column: . "Geom"
geometry_column: . ' \ \' \" "Geom"
bounds:
- -170.94984639004662
- -84.20025580733805

View File

@ -1,27 +1,14 @@
DROP SCHEMA IF EXISTS """Quotes' and Space.Dot." CASCADE;
CREATE SCHEMA """Quotes' and Space.Dot.";
CREATE SCHEMA """Quotes' \ \' \"" and Space.Dot.";
CREATE TABLE """Quotes' and Space.Dot.".". Points"" 'quote"
CREATE TABLE """Quotes' \ \' \"" and Space.Dot.".". Points"" \ \' \"" 'quote"
(
"' id '" SERIAL PRIMARY KEY,
".namE " TEXT,
". ""Geom""" GEOMETRY(POINT, 4326)
"' id '" SERIAL PRIMARY KEY,
".namE " TEXT,
". ' \ \' \"" ""Geom""" GEOMETRY(POINT, 4326)
);
-- INSERT INTO """Quotes' and Space.Dot.".". Points"" 'quote"
-- SELECT generate_series(1, 3),
-- md5(random()::text),
-- (ST_DUMP(ST_GENERATEPOINTS(st_transform(st_tileenvelope(18, 235085, 122323), 4326), 3))).Geom;
-- INSERT INTO """Quotes' and Space.Dot.".". Points"" 'quote"
-- SELECT generate_series(4, 30),
-- md5(random()::text),
-- (ST_DUMP(ST_GENERATEPOINTS(st_transform(st_tileenvelope(0, 0, 0), 4326), 27))).Geom;
--
-- To dump the data above, uncomment code the above, comment the INSERT code bellow, and run:
-- just restart
-- just pg_dump --data-only --inserts --rows-per-insert=100 --table="""Quotes' and Space.Dot.".". Points"" 'quote"
INSERT INTO """Quotes' and Space.Dot.".". Points"" 'quote"
INSERT INTO """Quotes' \ \' \"" and Space.Dot.".". Points"" \ \' \"" 'quote"
values (1, '02daedc70702ec68753fde38351f5d9d', '0101000020E610000050C4D38CE9DA61401EFC0EC7C3DA2740'),
(2, '7418427ba8a960c3661235f47cc13d46', '0101000020E6100000CC2F4170E9DA6140DEDB02B581DA2740'),
(3, 'd5a11dee7203a09442168eec74c7bea8', '0101000020E6100000008E66E9E6DA614059944356B4DA2740'),
@ -53,10 +40,10 @@ values (1, '02daedc70702ec68753fde38351f5d9d', '0101000020E610000050C4D38CE9DA61
(29, 'fd0775c59700ac8c1982aa3efe6cb0c7', '0101000020E6100000D6CF48A3E1A9464077D6BBFDD00C55C0'),
(30, '404175d17b08782edc9d316c378adc86', '0101000020E6100000F9B5A5ADB7265BC0EE07F81F2F284840');
CREATE INDEX ON """Quotes' and Space.Dot.".". Points"" 'quote" USING GIST (". ""Geom""");
CREATE INDEX ON """Quotes' \ \' \"" and Space.Dot.".". Points"" \ \' \"" 'quote" USING GIST (". ' \ \' \"" ""Geom""");
DO $do$ BEGIN
EXECUTE 'COMMENT ON TABLE """Quotes'' and Space.Dot.".". Points"" ''quote" IS $tj$' || $$
EXECUTE 'COMMENT ON TABLE """Quotes'' \ \'' \"" and Space.Dot.".". Points"" \ \'' \"" ''quote" IS $tj$' || $$
{
"description": "Escaping test table"
}