fix: columns w/ dollar sign($) don't need quoting
This commit is contained in:
committed by
Steve Chavez
parent
d556cea8ce
commit
84e03a16dd
@@ -1002,6 +1002,11 @@ spec actualPgVersion = do
|
||||
[json|[{":arr->ow::cast":" arrow-1 ","(inside,parens)":" parens-1 ","a.dotted.column":" dotted-1 "," col w space ":" space-1"}]|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
it "will select and filter a column that has dollars in(without double quoting)" $
|
||||
get "/do$llar$s?select=a$num$&a$num$=eq.100" `shouldRespondWith`
|
||||
[json|[{"a$num$":100}]|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
context "binary output" $ do
|
||||
it "can query if a single column is selected" $
|
||||
request methodGet "/images_base64?select=img&name=eq.A.png" (acceptHdrs "application/octet-stream") ""
|
||||
|
||||
Vendored
+3
@@ -800,3 +800,6 @@ INSERT INTO shop_bles(id, name, coords, shop_id, range_area) VALUES(2, 'Beacon-2
|
||||
|
||||
TRUNCATE TABLE "SPECIAL ""@/\#~_-".names CASCADE;
|
||||
INSERT INTO "SPECIAL ""@/\#~_-".names (id, name) VALUES (1, 'John'), (2, 'Mary');
|
||||
|
||||
TRUNCATE TABLE do$llar$s CASCADE;
|
||||
INSERT INTO do$llar$s (a$num$) VALUES (100), (200), (300);
|
||||
|
||||
Vendored
+1
@@ -194,6 +194,7 @@ GRANT ALL ON TABLE
|
||||
, shops
|
||||
, shop_bles
|
||||
, "SPECIAL ""@/\#~_-".names
|
||||
, do$llar$s
|
||||
TO postgrest_test_anonymous;
|
||||
|
||||
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
|
||||
|
||||
Vendored
+4
@@ -2685,3 +2685,7 @@ $$ LANGUAGE sql;
|
||||
CREATE FUNCTION test.special_extended_schema(val text) RETURNS text AS $$
|
||||
SELECT get_val_special(val);
|
||||
$$ LANGUAGE sql;
|
||||
|
||||
CREATE TABLE do$llar$s (
|
||||
a$num$ numeric
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user