Previous Thread
Next Thread
Print Thread
ASQL in Linux with Postgres database #31195 03 Jun 19 11:42 AM
Joined: Jun 2001
Posts: 713
S
Steven Shatz Offline OP
Member
OP Offline
Member
S
Joined: Jun 2001
Posts: 713
Can ASQL work in a limited capacity with Postgres SQL under Linux? All I need ASQL to do is invoke SQL DROP, CREATE, and INSERT statements.

Re: ASQL in Linux with Postgres database #31196 03 Jun 19 01:12 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
It would require either an ASQL connector for Postgres, or an ODBC driver.

Creating the ASQL connector is a programming project (a matter of implementing the various ASQL commands using the native C library for the database). All of the commands you mention are part of the general execute-SQL-statement command, but in order to get there, we first have to integrate all the pieces necessary for initializing the Postgres library, establishing a connection, setting options, handling errors, disconnecting etc. (Your limited requirements would allow us to ignore about half of the routines, i.e. those related to querying columns, processing result sets, and handling prepared statements.)

You might think that Postgres would be a popular option, but for whatever reason, I don't think anyone has actually requested it from us. But we might be willing to take it on as a project (for a reasonable fee of course!)

The ODBC approach requires two pieces: the ODBC driver and the ODBC Data Source Manager. Both of these pieces are readily available at no cost for Windows, so if you can figure out a way to run the process that will be talking to the database from within A-Shell/Windows, then you should be able to use the ASQL ODBC version right off the shelf.

Doing it from Linux is a bit more complicated, although there is another off-the-shelf solution there as well: the Easysoft ODBC driver for Postgres. We have not used that specific driver, but we have used their SQL Server driver. It, like pretty much everything Easysoft provides, is solid, high quality, and somewhat expensive, in this case about $2200 for a one server license (unlimited connections). But if that's within the budget and you don't want to fool around with trying to doing it from within Windows, then I would recommend that approach.

There is also (apparently) an open-source ODBC driver for Postgres available in source code form. In theory, that would also provide a path to a solution without requiring new development, although there's no telling how, without getting into it, how much effort it will take to get the various pieces compiled, linked, installed, etc. But it is something that could be explored independent of us or ASQL.

Re: ASQL in Linux with Postgres database #31197 04 Jun 19 10:29 AM
Joined: Jun 2001
Posts: 713
S
Steven Shatz Offline OP
Member
OP Offline
Member
S
Joined: Jun 2001
Posts: 713
I'm thinking another alternative would be to use "pgloader" to transfer the database from MySQL to Postgres SQL.

https://pgloader.io/


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3