Trying to implement postgresql - #1183
Conversation
0xFEEDC0DE64
commented
Apr 3, 2024
It still somehow fails: |
0xFEEDC0DE64
commented
Apr 3, 2024
with the driver "org.postgresql.ds.PGSimpleDataSource" the same result :( |
0xFEEDC0DE64
commented
Apr 3, 2024
getting closer to success: today i learned sql syntax of mysql is different to mysql of postgresql? |
TuxCoding
commented
Apr 3, 2024
Yes SQLite, MySQL and PostgresSQL are all slightly different.
Well the driver has to be available too. Spigot provides both drivers in their jar. |
0xFEEDC0DE64
commented
Apr 3, 2024
TuxCoding
commented
Apr 4, 2024
This means there is an earlier error that caused the plugin to disable itself before anything bad happens. |
found out that the plugin is disabled because ProtocolLib was missing on my test server |
0xFEEDC0DE64
commented
Apr 4, 2024
4efc658 to
56e43fbCompare0xFEEDC0DE64
commented
Apr 4, 2024
I have squashed all my commits into a single clean commit |
0xFEEDC0DE64
commented
Apr 4, 2024
another exception appeared on my live server: will debug this now |
0xFEEDC0DE64
commented
Apr 4, 2024
I have no idea why the uuid parser fails with postgres but not with sqlite the string is identical, I checked using log statements |
TuxCoding
commented
Apr 4, 2024
There could be space inside the UUID string. |
0xFEEDC0DE64
commented
Apr 4, 2024
0xFEEDC0DE64
commented
Apr 4, 2024
you were right, there were additional Spaces at the end, I have no idea how they got introduced but non the less I think trimming the String is always a good idea, see my latest commit |
One issue I have this code is that we are still required to include the PostgreSQL driver. Otherwise it wouldn't work. This project already include many other dependencies that I would consider this worth it. |
0xFEEDC0DE64
commented
May 3, 2024
How does it work on my spigot server now? I didnt add any drivers as far as I know |
TuxCoding
commented
May 3, 2024
The driver could be provided by another plugin like AuthMe. It includes that driver. |
0xFEEDC0DE64
commented
May 3, 2024
are you ok with adding the same driver to your plugin? |
TuxCoding
commented
May 5, 2024
Well, this plugin nowadays already comes near the maximum file size that Spigot allows. Creating an universal jar of all platform modules (e.g. Spigot) could shrink the size again. Furthermore, it would be possible to uses Spigot's 1.16 library loader, but dynamic dependency also has its downsides like increased startup time and requires additional downloads from Maven per server instead of once for downloading this plugin. Maybe, we could also merges this and make it usable if the driver is already made available by another plugin like AuthMe. Could you maybe explain shortly what makes you prefer Postgres over the other two? This isn't really a highly requested feature. |



Trying to implement postgres for #1182 myself.
Disclaimer: I have never seen or written Java before this pull request and I have no idea how to compile the sources to a working .jar file for my minecraft server.
But I hope that at least CI runs will check the syntax and if it compiles correctly?
Please help me finish this pull request :)