[Feature Request] PostgreSQL support? #14

Closed
opened 2021-09-01 10:39:55 +00:00 by nathanpaulyoung · 12 comments
nathanpaulyoung commented 2021-09-01 10:39:55 +00:00 (Migrated from github.com)

I have a bunch of existing infrastructure on postgres and would love postgres support in this.

I have a bunch of existing infrastructure on postgres and would love postgres support in this.
GovindasOM commented 2021-09-01 10:59:32 +00:00 (Migrated from github.com)

I do not have much experience with PostgreSQL - as it is SQL-based and I think HikariCP supports PostgreSQL, I think it should work? do you get any errors?

I do not have much experience with PostgreSQL - as it is SQL-based and I think HikariCP supports PostgreSQL, I think it should work? do you get any errors?
ham1255 commented 2021-09-01 11:56:06 +00:00 (Migrated from github.com)

i think postgresql is same as mysql but with differnet server stuff and i think hikaricp supports it

i think postgresql is same as mysql but with differnet server stuff and i think hikaricp supports it
nathanpaulyoung commented 2021-09-02 04:52:00 +00:00 (Migrated from github.com)

When I use a Postgres connection string, the request never returns and all subsequent commands in the skript never execute. No error is shown in the console.

When I use a Postgres connection string, the request never returns and all subsequent commands in the skript never execute. No error is shown in the console.
GovindasOM commented 2021-09-02 11:21:06 +00:00 (Migrated from github.com)

you may be able to get it to work by using postgresql java driver in config of skript-db

you'll probably need to load the jar somehow, you can do it by using skript-reflect addon and putting the driver jar in skript-reflect's folder then restarting server

you may be able to get it to work by using postgresql java driver in config of skript-db you'll probably need to load the jar somehow, you can do it by using skript-reflect addon and putting the driver jar in skript-reflect's folder then restarting server
Govindas added the
help wanted
label 2022-03-22 10:21:22 +00:00

I am interested in adding PostgreSQL support if someone is willing to help me testing with it.

I am interested in adding PostgreSQL support if someone is willing to help me testing with it.

I've been using the addon for quite some time along with postgreSQL.
To do this, I just added the driver directly to skript-db.jar.

config.yaml:
sql-driver-class-name: "org.postgresql.Driver"

script example:

options:
	sql_ip : "127.0.0.1:5432"
	sql_db : "minecraft"
	sql_username : "user"
	sql_password : "userpass"

on load:
	set {sql} to the database "postgresql://%{@sql_ip}%/%{@sql_db}%?user=%{@sql_username}%&password=%{@sql_password}%&useSSL=false"

It works without any problem. For months of use, bugs have not been noticed.

I've been using the addon for quite some time along with postgreSQL. To do this, I just added the [driver](https://jdbc.postgresql.org/) directly to `skript-db.jar`. config.yaml: `sql-driver-class-name: "org.postgresql.Driver"` script example: ``` options: sql_ip : "127.0.0.1:5432" sql_db : "minecraft" sql_username : "user" sql_password : "userpass" on load: set {sql} to the database "postgresql://%{@sql_ip}%/%{@sql_db}%?user=%{@sql_username}%&password=%{@sql_password}%&useSSL=false" ``` It works without any problem. For months of use, bugs have not been noticed.

@kossnikita

I've been using the addon for quite some time along with postgreSQL.
To do this, I just added the driver directly to skript-db.jar.

config.yaml:
sql-driver-class-name: "org.postgresql.Driver"

script example:

options:
  sql_ip : "127.0.0.1:5432"
  sql_db : "minecraft"
  sql_username : "user"
  sql_password : "userpass"

on load:
  set {sql} to the database "postgresql://%{@sql_ip}%/%{@sql_db}%?user=%{@sql_username}%&password=%{@sql_password}%&useSSL=false"

It works without any problem. For months of use, bugs have not been noticed.

Thank you for testing, I will probably add PostgreSQL support built-in in the next update

@kossnikita >I've been using the addon for quite some time along with postgreSQL. >To do this, I just added the [driver](https://jdbc.postgresql.org/) directly to `skript-db.jar`. > >config.yaml: >`sql-driver-class-name: "org.postgresql.Driver"` > >script example: >``` >options: > sql_ip : "127.0.0.1:5432" > sql_db : "minecraft" > sql_username : "user" > sql_password : "userpass" > >on load: > set {sql} to the database "postgresql://%{@sql_ip}%/%{@sql_db}%?user=%{@sql_username}%&password=%{@sql_password}%&useSSL=false" >``` > >It works without any problem. For months of use, bugs have not been noticed. Thank you for testing, I will probably add PostgreSQL support built-in in the next update
Govindas removed the
help wanted
label 2022-04-02 10:28:30 +00:00

Any update?
Just got an error

java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgresql://127.0.0.1:5432/minecraft?user=auth&password=<masked>&useSSL=false

This occurs if there are no permissions to the plugin configuration file. In this case, there is no error about reading the file. Maybe you should add a permissions check to the configuration file?

Any update? Just got an error ``` java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgresql://127.0.0.1:5432/minecraft?user=auth&password=<masked>&useSSL=false ``` This occurs if there are no permissions to the plugin configuration file. In this case, there is no error about reading the file. Maybe you should add a permissions check to the configuration file?

Does it have only permission to read file, but not edit?

Does it have only permission to read file, but not edit?

Or do you mean I should add a check whether the file is readable?

Or do you mean I should add a check whether the file is readable?

I have checked code around the place and I now understand the issue, I will try to patch it within next 3 days together with built-in PostgreSQL support

EDIT: sorry for the delay, life got in the way, I will try to look into it soon. (2022-12-08)

I have checked code around the place and I now understand the issue, I will try to patch it within next 3 days together with built-in PostgreSQL support EDIT: sorry for the delay, life got in the way, I will try to look into it soon. (2022-12-08)

Fixed in 1.3.9, to be released soon

Fixed in 1.3.9, to be released soon
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Limework/skript-db#14
No description provided.