Thread: running PostGres without installing it

running PostGres without installing it

From
jesus martinez
Date:
hello, how are you ?

i want to distribute a copy of PostGres to my clients.
they really dont know anything about installing
programs or
configurating remote RDBMS sql-servers,
so i dont want to give them the
"official-PostGres-installer.exe"
but my own installer.exe (win32) that:

1) install the PostGres's required files
2) modify the system as PostGres needs (registry,
paths, etc)
3) execute it as a process, not as a service (if it is
possible)
(it must run also on win98 machines)
4) enable the server in a port readed from an INI file
or
something like that.
5) delete the default super-user or change its
password
6) creates the tables-structure that my client-app
needs
7a) insert the data or
7b) copy db-files to hdd, assign them in PostGres and
make
them available via PostGres.
8) create the dbuser that will be used by clients-apps
9) assign that dbuser to my tables

all without any kind of user interaction.

- where can i get information about the required
information
(i mean: basic required files, registry changes, conf
files,
sql commands to do what i need) ?

- if this is not possible, may i call the default
PostGre's
installer in silent mode ? and if so, what are the
command-lines
to set the defaults settings ?

- can any of you help me in any of those tasks ?

thanks in advance,






__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas


Re: running PostGres without installing it

From
"Aaron Bono"
Date:
On 8/5/06, jesus martinez <jesus_martinez1967@yahoo.com.ar> wrote:

i want to distribute a copy of PostGres to my clients.
they really dont know anything about installing
programs or
configurating remote RDBMS sql-servers,
so i dont want to give them the
"official-PostGres-installer.exe "
but my own installer.exe (win32)

 
I would love to know this too.  Is there a way to just copy the PostgreSQL files to the hard drive without the installer, load up the database and start and stop it as an application rather than a service?  A silent installer may solve the problem but what if you have 2 applications that both have installers and want to install PostgreSQL?  The silent installer would need to be able to detect that it is already installed (which I think it already does) and then skip the PostgreSQL install without bugging the user (not sure it would do that).

For years I have struggled with desktop applications and data access/storage.  Databases are very powerful tools but, other than MS Access, I have not seen any that are easily distributable bundled with a desktop application.  Not having a personal database to bundle with my applications has proven to be a "one hand tied behind my back" situation.

Any ideas you guys have would be deeply appreciated.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

Re: running PostGres without installing it

From
Chris Mair
Date:
> For years I have struggled with desktop applications and data
> access/storage.  Databases are very powerful tools but, other than MS
> Access, I have not seen any that are easily distributable bundled with
> a desktop application.  Not having a personal database to bundle with
> my applications has proven to be a "one hand tied behind my back"
> situation.
>
> Any ideas you guys have would be deeply appreciated.

I hate to say this, but maybe you should look into SQLite
http://www.sqlite.org/ ...

Bye,
Chris.


--

Chris Mair
http://www.1006.org



Re: running PostGres without installing it

From
Amadeus Zilfinski
Date:
<snip>
>
> For years I have struggled with desktop applications and data
> access/storage.  Databases are very powerful tools but, other than MS
> Access, I have not seen any that are easily distributable bundled with
> a desktop application.  Not having a personal database to bundle with
> my applications has proven to be a "one hand tied behind my back"
> situation.
>
> Any ideas you guys have would be deeply appreciated.
>

SQLite can be complied to a single binary/.dll/.so and used. That is the
route I'm looking at due to having to be an 'expert' to install
PostgresQL, and how invasive it can be on a system. I don't have any
experience with firebird or MySQL, so you might want to check out those.


AmadeusZ.-


Re: running PostGres without installing it

From
"Aaron Bono"
Date:
On 8/6/06, Amadeus Zilfinski <amadeus0@cox.net> wrote:
<snip>
>
> For years I have struggled with desktop applications and data
> access/storage.  Databases are very powerful tools but, other than MS
> Access, I have not seen any that are easily distributable bundled with
> a desktop application.  Not having a personal database to bundle with
> my applications has proven to be a "one hand tied behind my back"
> situation.
>
> Any ideas you guys have would be deeply appreciated.
>

SQLite can be complied to a single binary/.dll/.so and used. That is the
route I'm looking at due to having to be an 'expert' to install
PostgresQL, and how invasive it can be on a system. I don't have any
experience with firebird or MySQL, so you might want to check out those.

 
Would something like SQLite support the full functionality that we get from PostgreSQL: subqueries, transactions, views, triggers and stored procedures?  MySQL does not (yes I know they are adding some or all of this but it isn't all there or proven to be reliable yet).

I will check SQLite out but MySQL is probably NOT a good option for this.  Historically it did not support subqueries (an absolute must for any serious database user) - not sure if they have added subquery support recently or not.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

Re: running PostGres without installing it

From
Amadeus Zilfinski
Date:
>
>
> Would something like SQLite support the full functionality that we get
> from PostgreSQL: subqueries, transactions, views, triggers and stored
> procedures?  MySQL does not (yes I know they are adding some or all of
> this but it isn't all there or proven to be reliable yet).
>
> I will check SQLite out but MySQL is probably NOT a good option for
> this.  Historically it did not support subqueries (an absolute must
> for any serious database user) - not sure if they have added subquery
> support recently or not.
>

SQLite goes for SQL '92 compliance whereas PostgresQL goes for I think
it is) '99 (or is it '95?) compliance.

http://sqlite.org/omitted.html tells you what is missing from the
software against the '92 standard. Against PostgresQL SQLite will lose
in the features department almost every time.

My only real issue with PostgresQL is that it is a client/server
database, that is not embeddable. If it was embeddable then I could use
it with no issue, and would in fact rather use it. I recall some people
are working on that, but don't have any links. You might want to try
www.postgresql.org and see if they any info on there.

AmadeusZ.-


Re: running PostGres without installing it

From
Christopher Browne
Date:
amadeus0@cox.net (Amadeus Zilfinski) wrote:
> My only real issue with PostgresQL is that it is a client/server
> database, that is not embeddable. If it was embeddable then I could
> use it with no issue, and would in fact rather use it. I recall some
> people are working on that, but don't have any links. You might want
> to try www.postgresql.org and see if they any info on there.

No, there is *not* an a set of people working on "making PostgresQL
embeddable"; it has been talked about, but never taken particularly
seriously.

There's a way to do *a sort of embedding*, but one that specifically
ignores the notion of doing this in an in-process manner.

You could hide a PostgresQL instance, using a variant port, generally
making it pretty hidden away.  Initializing, starting, and stopping it
could be hidden inside the application.

But in no way would this be an embedding as is normally understood,
where all that's needful is to include a library and open the right
directory.
--
select 'cbbrowne' || '@' || 'gmail.com';
http://linuxdatabases.info/info/lisp.html
"Bureaucracies interpret communication as damage and route around it"
-- Jamie Zawinski

unsubscribe

From
Yoon Lee
Date:
unsubsribe me.

--
Yoon Lee
Software Developer
W:604 451 4514
C:604 512 4460


unsubscribe

From
"Bol"
Date:
 unsubsribe me.


Re: running PostGres without installing it

From
Darcy Buskermolen
Date:
On Saturday 05 August 2006 21:07, jesus martinez wrote:
> hello, how are you ?
>
> i want to distribute a copy of PostGres to my clients.
> they really dont know anything about installing
> programs or
> configurating remote RDBMS sql-servers,
> so i dont want to give them the
> "official-PostGres-installer.exe"
> but my own installer.exe (win32) that:
>
> 1) install the PostGres's required files
> 2) modify the system as PostGres needs (registry,
> paths, etc)
> 3) execute it as a process, not as a service (if it is
> possible)
> (it must run also on win98 machines)

PostgreSQLl needs an NT like system to run on, so 98 is not an option.

> 4) enable the server in a port readed from an INI file
> or
> something like that.
> 5) delete the default super-user or change its
> password
> 6) creates the tables-structure that my client-app
> needs
> 7a) insert the data or
> 7b) copy db-files to hdd, assign them in PostGres and
> make
> them available via PostGres.
> 8) create the dbuser that will be used by clients-apps
> 9) assign that dbuser to my tables
>
> all without any kind of user interaction.
>
> - where can i get information about the required
> information
> (i mean: basic required files, registry changes, conf
> files,
> sql commands to do what i need) ?
>
> - if this is not possible, may i call the default
> PostGre's
> installer in silent mode ? and if so, what are the
> command-lines
> to set the defaults settings ?
>
> - can any of you help me in any of those tasks ?
>
> thanks in advance,
>
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Darcy Buskermolen
CommandPrompt, Inc.
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
http://www.commandprompt.com


Re: running PostGres without installing it

From
"Magnus Hagander"
Date:
>     i want to distribute a copy of PostGres to my clients.
>     they really dont know anything about installing
>     programs or
>     configurating remote RDBMS sql-servers,
>     so i dont want to give them the
>     "official-PostGres-installer.exe "
>     but my own installer.exe (win32)
>
>
>
> I would love to know this too.  Is there a way to just copy the
> PostgreSQL files to the hard drive without the installer, load up
> the database and start and stop it as an application rather than a
> service?  A silent installer may solve the problem but what if you
> have 2 applications that both have installers and want to install
> PostgreSQL?  The silent installer would need to be able to detect
> that it is already installed (which I think it already does) and
> then skip the PostgreSQL install without bugging the user (not sure
> it would do that).

It can be made to do that.
However, it should work just fine to copy the files and go from there.
You can get the binaries-no-instaler package on the web, but beware that
it does not contain all the dependencies. Another way to get the
"official version binaries" is to make an install on one machine and
then just copy everything from the directory you install it in. As of
8.1, postgresql puts *no files* in the Windows or SYSTEM32 directories.

Then you just start and stop the database using pg_ctl from inside your
app.

It's a lot more overhead than a db engine like access (JET) or sqlite,
but you do get a lot of extra features for that.

//Magnus