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

PostgreSql incompatibility for UuidBinaryOrderedTimeType #3

Closed
massimilianobraglia opened this issue May 9, 2019 · 5 comments
Closed

Comments

@massimilianobraglia
Copy link

massimilianobraglia commented May 9, 2019

Hey there,

we're facing a problem while inserting messages in our table.
As stated here ramsey/uuid#179 and here ramsey/uuid-doctrine#47 (comment), using UuidBinaryOrderedTimeType and UuidBinaryType are intended primarly for MySQL/MariaDB DBMS. Instead, for PostgreSql is intended the UuidType.

In fact, the insert results in the following error:

INSERT INTO queue_api (id, published_at, body, headers, properties, priority, time_to_live, delayed_until) VALUES ('9a304ec0-7241-11e9-b7f6-0242ac12000c', '2019-05-09 10:02:49', '{"message_body":"the body"}', '{"type": "App\Messenge\FullyQualified\Name"}', '[]', 0, null, null)

ERROR: invalid byte sequence for encoding "UTF8": 0xe9 0x72 0x42

I have time to make a PR, but before a little discussion:
Explicitly checking the Database platform at this line seems not so elegant.
\Kcs\MessengerExtra\Transport\Dbal\DbalSender::send#line79

Any advice?

PS:
To reproduce this is really simple: just try to persist a new message with Symfony + Doctrine (and obviously Messenger with this bundle)

@alekitto
Copy link
Owner

alekitto commented May 9, 2019

Seems that binary (LARGE_OBJECT) flags was not set in getBindingType method of none of the uuid-doctrine types. This leads to that error in postgresql as the server does not expect binary values.

Workin' on it

@massimilianobraglia
Copy link
Author

Exactly. The merged a PR on that and reverted because is platform dependant. (you can find a closed PR on ramsey/uuid-doctrine)

@alekitto
Copy link
Owner

alekitto commented May 9, 2019

Should be fixed in master (ref: 70779b4)

@massimilianobraglia
Copy link
Author

Ok, thank you. I'll let you know if it solves my issue

@massimilianobraglia
Copy link
Author

@alekitto seems to work fine! Thank you 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants