splitgraph / seafowl

Analytical database for data-driven Web applications 🪶
https://seafowl.io
Apache License 2.0
392 stars 9 forks source link

Renaming table with special characters in schema name not working #361

Closed gruuya closed 1 year ago

gruuya commented 1 year ago
$ curl -H "Content-Type: application/json" http://localhost:8080/q -d@-<<EOF
{"query": "CREATE TABLE test_underscore AS VALUES (1, 2);
CREATE TABLE test_slash AS VALUES (1, 2);
CREATE TABLE test_hyphen AS VALUES (1, 2);
CREATE SCHEMA \"test_schema\";
CREATE SCHEMA \"test/schema\";
CREATE SCHEMA \"test-schema\";
ALTER TABLE test_underscore RENAME TO \"test_schema\".test_underscore;
ALTER TABLE test_slash RENAME TO \"test/schema\".test_slash;
ALTER TABLE test_hyphen RENAME TO \"test-schema\".test_hyphen;
SELECT table_schema, table_name FROM information_schema.tables WHERE table_name LIKE '%test%'"}
EOF
{"table_name":"test_hyphen","table_schema":"public"}
{"table_name":"test/schema.test_slash","table_schema":"public"}
{"table_name":"test_underscore","table_schema":"test_schema"}