Use table alias unlikely to conflict with a column name (#705)
This commit is contained in:
@@ -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
|
||||
|
||||
Vendored
+1
@@ -38,6 +38,7 @@ GRANT ALL ON TABLE
|
||||
, "Escap3e;"
|
||||
, "ghostBusters"
|
||||
, "withUnique"
|
||||
, "clashing_column"
|
||||
, "موارد"
|
||||
, addresses
|
||||
, orders
|
||||
|
||||
Vendored
+4
@@ -703,6 +703,10 @@ CREATE TABLE "withUnique" (
|
||||
extra text
|
||||
);
|
||||
|
||||
CREATE TABLE clashing_column (
|
||||
t text
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: test; Owner: -
|
||||
|
||||
Reference in New Issue
Block a user