A
A
Alexey2014-02-27 09:16:03
PostgreSQL
Alexey, 2014-02-27 09:16:03

Postgre SQL, is it possible to make "portable"?

Good day! I am developing a client-server application in Qt, now I need to use Postgre SQL. The application (ARM) has the ability to remotely install software on servers (roughly speaking, the usual copying of the binary and dependencies via telnet). Is it possible to do the same with Postgre SQL? So that it looks something like this:
1) My application that works with the database is copied to the remote machine, some Postgre libraries
2) From the application (without using any pgAdmin), a database is created at startup, and subsequent work with it is performed
Is there a possibility to do so? You just need to do nothing at all with the handles on the remote machine, the username and password have already been set, and the database is somehow created from the program, although I did not find how to do this without pgAdmin

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vit, 2014-02-27
@fornit1917

In order to create a database, pgAdmin is not required. To create a database, you need to execute several appropriate SQL queries (CREATE DATABASE, CREATE TABLE,...). Of course, they can be done programmatically through the client library

A
Alexander Korotkov, 2014-04-13
@smagen

Quite possible. In fact, you just need to manually install postgres. The steps are:
1) Install the Visual C++ Redistributable of the required version
2) Copy the files of the postgres itself
3) Make initdb
4) Start the database via pg_ctl (or create a service via pg_ctl)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question