supabase-community / postgrest-go

Isomorphic Go client for PostgREST. (Now Updating)
https://supabase.io
Apache License 2.0
170 stars 27 forks source link

Fix malformed array literal cause by Overalps func #43

Closed whoiscarlo closed 8 months ago

whoiscarlo commented 8 months ago

https://www.postgresql.org/docs/current/arrays.html

What kind of change does this PR introduce?

Correctly formatting the array used by the Overlap function

Bug fix, feature, docs update, ... Arrays in Postgres use this string format '{10000, 10000, 10000, 10000}' or '{"meeting", "lunch"}'

What is the current behavior?

value []string{"foo", "bar"} turns into foo bar

Please link any relevant issues here. Seeding database error while running locally

What is the new behavior?

Will turn values []string{"foo", "bar"} into '{"foo", "bar"}'

Additional context

https://www.postgresql.org/docs/current/arrays.html