-
Notifications
You must be signed in to change notification settings - Fork 76
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
function pgmq.send_batch(unknown, jsonb[], unknown) is not unique\nHINT: Could not choose a best candidate function. You might need to add explicit type casts. #364
Comments
Related, #362 We're working on a fix. |
In the meantime, |
@markbalazon could you confirm the exact SQL that you are executing? I'm able to reproduce that error on v1.5.0 with the following SQL, but it works on v1.4.5. Would be helpful to see exactly which type parameters is giving you the error. \dx pgmq
List of installed extensions
Name | Version | Schema | Description
------+---------+--------+---------------------------------------------------------------------
pgmq | 1.5.0 | pgmq | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.
(1 row)
SELECT pgmq.send_batch(
'batch_queue',
ARRAY['{"hello": "world_0"}', '{"hello": "world_1"}']::jsonb[], '0'
);
ERROR: function pgmq.send_batch(unknown, jsonb[], unknown) is not unique
LINE 1: SELECT pgmq.send_batch(
^
HINT: Could not choose a best candidate function. You might need to add explicit type casts. \dx pgmq
List of installed extensions
Name | Version | Schema | Description
------+---------+--------+---------------------------------------------------------------------
pgmq | 1.4.5 | pgmq | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.
(1 row)
SELECT pgmq.send_batch(
'batch_queue',
ARRAY['{"hello": "world_0"}', '{"hello": "world_1"}']::jsonb[], '0'
);
send_batch
------------
1
2
(2 rows) If this is the problem you're having, then it looks like |
@markbalazon - if ☝️ is exactly your issue, I think the quickest fix for you would be to explicitly type the This should work on v1.5.0. SELECT pgmq.send_batch('batch_queue', ARRAY['{"hello": "world_0"}', '{"hello": "world_1"}']::jsonb[], 0); The new features in released v1.5.0 were not meant to be breaking changes. |
Hi! thank you for your quick response. I'm using the python client like so: For v1.5.0, do i need to specify the delay param in the client library as well? |
Thanks @markbalazon - I think we can fix your issue by patching the python client. I'll work on getting a patch out for you in #365 |
@markbalazon , tembo-pgmq-python v0.9.2 was released. Can you confirm whether this resolves your issue? |
Hey, pulled the latest docker image and now I'm getting this error when calling
send_batch()
FWIW i was not receiving this error before i pulled the latest docker image.
The text was updated successfully, but these errors were encountered: