Use table alias unlikely to conflict with a column name (#705)

This commit is contained in:
Joe Nelson
2016-09-08 08:16:47 -07:00
committed by GitHub
parent af75988dd4
commit f3b79bcc40
4 changed files with 21 additions and 12 deletions
+4
View File
@@ -17,6 +17,10 @@ spec = do
it "should not confuse count column with pg_catalog.count aggregate" $
get "/has_count_column" `shouldRespondWith` 200
describe "Querying a table with a column called t" $
it "should not conflict with internal postgrest table alias" $
get "/clashing_column?select=t" `shouldRespondWith` 200
describe "Querying a nonexistent table" $
it "causes a 404" $
get "/faketable" `shouldRespondWith` 404
+1
View File
@@ -38,6 +38,7 @@ GRANT ALL ON TABLE
, "Escap3e;"
, "ghostBusters"
, "withUnique"
, "clashing_column"
, "موارد"
, addresses
, orders
+4
View File
@@ -703,6 +703,10 @@ CREATE TABLE "withUnique" (
extra text
);
CREATE TABLE clashing_column (
t text
);
--
-- Name: id; Type: DEFAULT; Schema: test; Owner: -