Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings when searching stripe prices using the JSON attrs column #286

Open
2 tasks done
vickkhera opened this issue Jun 13, 2024 · 0 comments
Open
2 tasks done

warnings when searching stripe prices using the JSON attrs column #286

vickkhera opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vickkhera
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

When searching for prices by the lookup_key field, a warning is emitted. The query still succeeds and returns the expected matching records.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Install the foreign table wrapper for stripe as per the documentation and create the stripe.prices foreign table.
  2. run this query in the psql CLI: select * from stripe.prices where attrs->>'lookup_key' = 'foo';
  3. see the warning
postgres=> select * from stripe.prices where attrs->>'lookup_key' = 'foo';
WARNING:  unsupported operator expression in qual: {OPEXPR :opno 98 :opfuncid 67 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 100 :args ({OPEXPR :opno 3477 :opfuncid 3214 :opresulttype 25 :opretset false :opcollid 100 :inputcollid 100 :args ({VAR :varno 1 :varattno 8 :vartype 3802 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnosyn 1 :varattnosyn 8 :location 34} {CONST :consttype 25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false :constisnull false :location 42 :constvalue 14 [ 56 0 0 0 108 111 111 107 117 112 95 107 101 121 ]}) :location 39} {CONST :consttype 25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false :constisnull false :location 57 :constvalue 7 [ 28 0 0 0 102 111 111 ]}) :location 55}
DETAIL:  Wrappers
 id | active | currency | product | unit_amount | type | created | attrs
----+--------+----------+---------+-------------+------+---------+-------
(0 rows)

Similar error happens if I use LIKE instead of = and even when there are records that match.

Side note: it would be really awesome if we could promote additional fields like lookup_key to be columns rather than having to reference them via the JSONB column, but not a big deal.

Expected behavior

No warnings should be emitted.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS running local dev in docker
  • Browser (if applies) [e.g. chrome, safari] n/a
  • Version of supabase-js: [e.g. 6.0.2] @supabase/[email protected]
  • Version of Node.js: [e.g. 10.10.0] v22.2.0

Additional context

Docker container version of Postgres: 15.1.1.41

@vickkhera vickkhera added the bug Something isn't working label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant