fix: paramaters of type character and bit not ignoring length
- Fixes the error "value too long for type character(1)" when the char length of the parameter was bigger than one.
This commit is contained in:
@@ -387,14 +387,14 @@ spec actualPgVersion = do
|
||||
-- https://github.com/PostgREST/postgrest/issues/2861
|
||||
context "bit and char columns with length" $ do
|
||||
it "should update a bit column with length" $
|
||||
request methodPatch "/bitchar_with_length?char=eq.aaaaa"
|
||||
request methodPatch "/bitchar_with_length?select=bit,char&char=eq.aaaaa"
|
||||
[("Prefer", "return=representation")]
|
||||
[json|{"bit": "11100"}|]
|
||||
`shouldRespondWith` [json|[{ "bit": "11100", "char": "aaaaa" }]|]
|
||||
{ matchStatus = 200 }
|
||||
|
||||
it "should update a char column with length" $
|
||||
request methodPatch "/bitchar_with_length?bit=eq.00000"
|
||||
request methodPatch "/bitchar_with_length?select=bit,char&bit=eq.00000"
|
||||
[("Prefer", "return=representation")]
|
||||
[json|{"char": "zzzyy"}|]
|
||||
`shouldRespondWith` [json|[{ "bit": "00000", "char": "zzzyy" }]|]
|
||||
|
||||
Reference in New Issue
Block a user