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

Feature request: Postgresql module #39

Closed
timoc opened this issue Mar 31, 2021 · 4 comments
Closed

Feature request: Postgresql module #39

timoc opened this issue Mar 31, 2021 · 4 comments

Comments

@timoc
Copy link

timoc commented Mar 31, 2021

hi,

I use postgres for my database needs.
It would like to be able to use the virtualpg+sqlite3 and native postgresql for database backends and query writing

@pcmacdon
Copy link
Owner

pcmacdon commented Apr 2, 2021

Interesting. I've never used virtualpg myself, but I was able to build and load it in Jsi with:

var db = new Sqlite(null,{load:true});
db.query("SELECT load_extension('./mod_virtualpg.so')");

So no new feature is required.

https://www.sqlite.org/loadext.html

@pcmacdon pcmacdon closed this as completed Apr 3, 2021
@timoc
Copy link
Author

timoc commented Apr 4, 2021

I could not find any documentation on this, but to be clear, the goal is:

One codebase containing one set of PostgresQL SQL queries, that can use postgres or SQLite3 as a backend.

including using postgres based schema creation scripts.

And then the ability to use jsish to work with either.

@pcmacdon
Copy link
Owner

pcmacdon commented Apr 4, 2021

Not sure I understand above: is this a question?

As mentioned, I have no previous experience using virtualpg, but was able to built it, and enable/load it in jsish no problem.

I didn't go further, but you should then be able to follow the tutorial:

https://www.gaia-gis.it/fossil/virtualpg/wiki?name=tutorial

This seems to imply the schema/table creation is PostgresQL-only, but I could be wrong about that.

That said, I think virtualpg is a very cool idea. And I think it would be even better if there was a virtualmysql/mariadb.

@pcmacdon pcmacdon reopened this Apr 4, 2021
@timoc
Copy link
Author

timoc commented Apr 9, 2021

thanks will give it a try

@timoc timoc closed this as completed Apr 9, 2021
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