You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In postgres, citext arrays (citext[]) are not supported consistantly with text arrays (text[]). Both types should be usable.
Currently, text[] is supported as expected; when values are retreived, they are exposed to ruby as string arrays: ["one", "two", "three four"]. citext[] does not perform this same translation; instead results are returned in a native format: '{"one", "two", "three four"}'
Examining the inferred schema gives no indication of why they behave differently:
text[]:
Describe the bug
In postgres, citext arrays (
citext[]
) are not supported consistantly with text arrays (text[]
). Both types should be usable.Currently,
text[]
is supported as expected; when values are retreived, they are exposed to ruby as string arrays:["one", "two", "three four"]
.citext[]
does not perform this same translation; instead results are returned in a native format:'{"one", "two", "three four"}'
Examining the inferred schema gives no indication of why they behave differently:
text[]:
citext[]:
#<ROM::SQL::Attribute[NilClass | Array] name=:tags db_type="citext[]" database="postgres" type="citext" read=#<Dry::Types[Sum<Constrained<Nominal<NilClass> rule=[type?(NilClass)]> | Constructor<Array fn=/home/flip/.gem/ruby/2.6.4/gems/rom-sql-3.0.1/lib/rom/sql/extensions/postgres/types/array.rb:13>>]> source=ROM::Relation::Name(products) index=true qualified=true sql_expr=#<Sequel::SQL::QualifiedIdentifier @table=>:products, @column=>:tags> alias=nil>
To Reproduce
text[]
andcitext[]
columnsExpected behavior
citext[]
should behave the same astext[]
The text was updated successfully, but these errors were encountered: