Thread: embedded postgresql
Hi, I am starting a new project where I intend to use embedded database server in my win32 application. I intend to use VC++ microsoft studio 6.0 as my development environment. The postgres.org website seems to be catering for people with all sorts of requirements and platforms. 1. Where can I find the binary distribution so that I can use postgres server as an embedded database. I assume it is a .dll 2. Also I would like to have the documentation which shows how to start & stop the server programmatically and execute sql, to create a database, use select insert , update etc. 3. Is it correct that I do not have to pay any user licences. Postgres is free not only for development but also I can include it in my software package. Thanks. ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
jini us wrote: >Hi, > >I am starting a new project where I intend to use >embedded database server in my win32 application. >I intend to use VC++ microsoft studio 6.0 as my >development environment. > >The postgres.org website seems to be catering for >people with all sorts of requirements and platforms. > >1. Where can I find the binary distribution so that I >can use postgres server as an embedded database. >I assume it is a .dll > > No... PostgreSQL is a database server, thus you connect to it via TCP/IP or domain sockets (preferrably TCP/IP). Also an emulation layer such as Cygwin will be required to use PostgreSQL on Windows. >2. Also I would like to have the documentation which >shows how to start & stop the server programmatically >and execute sql, to create a database, use select >insert , update etc. > > > www.postgresql.org click on docs. >3. Is it correct that I do not have to pay any user >licences. >Postgres is free not only for development but also I >can include it in my software package. > > > Yes that is correct. >Thanks. > > > > > > > > >________________________________________________________________________ >Want to chat instantly with your online friends? Get the FREE Yahoo! >Messenger http://mail.messenger.yahoo.co.uk > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > > -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC Postgresql support, programming shared hosting and dedicated hosting. +1-503-222-2783 - jd@commandprompt.com - http://www.commandprompt.com Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org
It is a shame that postgres is not available as an embedded server unlike mysql database server which comes in the form of a dll. However with mysql licence I would have to pay $10,000 if I wish to include it in mysql as an embedded server in my app. mysql database server is also a TCP/IP socket server whether embedded or otherwise. --- "Joshua D. Drake" <jd@commandprompt.com> wrote: > jini us wrote: > > >Hi, > > > >I am starting a new project where I intend to use > >embedded database server in my win32 application. > >I intend to use VC++ microsoft studio 6.0 as my > >development environment. > > > >The postgres.org website seems to be catering for > >people with all sorts of requirements and > platforms. > > > >1. Where can I find the binary distribution so that > I > >can use postgres server as an embedded database. > >I assume it is a .dll > > > > > No... PostgreSQL is a database server, thus you > connect to it via TCP/IP > or domain sockets (preferrably TCP/IP). > > Also an emulation layer such as Cygwin will be > required to use PostgreSQL > on Windows. > > >2. Also I would like to have the documentation > which > >shows how to start & stop the server > programmatically > >and execute sql, to create a database, use select > >insert , update etc. > > > > > > > www.postgresql.org click on docs. > > > >3. Is it correct that I do not have to pay any user > >licences. > >Postgres is free not only for development but also > I > >can include it in my software package. > > > > > > > Yes that is correct. > > > >Thanks. > > > > > > > > > > > > > > > > > >________________________________________________________________________ > >Want to chat instantly with your online friends? > Get the FREE Yahoo! > >Messenger http://mail.messenger.yahoo.co.uk > > > >---------------------------(end of > broadcast)--------------------------- > >TIP 8: explain analyze is your friend > > > > > > > -- > Command Prompt, Inc., home of Mammoth PostgreSQL - > S/ODBC and S/JDBC > Postgresql support, programming shared hosting and > dedicated hosting. > +1-503-222-2783 - jd@commandprompt.com - > http://www.commandprompt.com > Editor-N-Chief - PostgreSQl.Org - > http://www.postgresql.org > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
Hello, Are you sure you are not thinking of just the libpq.dll? That would allow linking to PostgreSQL via C/C++ etc? Sincerely, Joshua Drake jini us wrote: >It is a shame that postgres is not available as an >embedded server unlike mysql database server which >comes in the form of a dll. > >However with mysql licence I would have to pay $10,000 >if I wish to include it in mysql as an embedded server >in my app. > >mysql database server is also a TCP/IP socket server >whether embedded or otherwise. > > --- "Joshua D. Drake" <jd@commandprompt.com> wrote: > >jini us wrote: > > >>>Hi, >>> >>>I am starting a new project where I intend to use >>>embedded database server in my win32 application. >>>I intend to use VC++ microsoft studio 6.0 as my >>>development environment. >>> >>>The postgres.org website seems to be catering for >>>people with all sorts of requirements and >>> >>> >>platforms. >> >> >>>1. Where can I find the binary distribution so that >>> >>> >>I >> >> >>>can use postgres server as an embedded database. >>>I assume it is a .dll >>> >>> >>> >>> >>No... PostgreSQL is a database server, thus you >>connect to it via TCP/IP >>or domain sockets (preferrably TCP/IP). >> >>Also an emulation layer such as Cygwin will be >>required to use PostgreSQL >>on Windows. >> >> >> >>>2. Also I would like to have the documentation >>> >>> >>which >> >> >>>shows how to start & stop the server >>> >>> >>programmatically >> >> >>>and execute sql, to create a database, use select >>>insert , update etc. >>> >>> >>> >>> >>> >>www.postgresql.org click on docs. >> >> >> >> >>>3. Is it correct that I do not have to pay any user >>>licences. >>>Postgres is free not only for development but also >>> >>> >>I >> >> >>>can include it in my software package. >>> >>> >>> >>> >>> >>Yes that is correct. >> >> >> >> >>>Thanks. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>________________________________________________________________________ >> >> >>>Want to chat instantly with your online friends? >>> >>> >>Get the FREE Yahoo! >> >> >>>Messenger http://mail.messenger.yahoo.co.uk >>> >>>---------------------------(end of >>> >>> >>broadcast)--------------------------- >> >> >>>TIP 8: explain analyze is your friend >>> >>> >>> >>> >>-- >>Command Prompt, Inc., home of Mammoth PostgreSQL - >>S/ODBC and S/JDBC >>Postgresql support, programming shared hosting and >>dedicated hosting. >>+1-503-222-2783 - jd@commandprompt.com - >>http://www.commandprompt.com >>Editor-N-Chief - PostgreSQl.Org - >>http://www.postgresql.org >> >> >> >>---------------------------(end of >>broadcast)--------------------------- >>TIP 4: Don't 'kill -9' the postmaster >> >> > >________________________________________________________________________ >Want to chat instantly with your online friends? Get the FREE Yahoo! >Messenger http://mail.messenger.yahoo.co.uk > > -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC Postgresql support, programming shared hosting and dedicated hosting. +1-503-222-2783 - jd@commandprompt.com - http://www.commandprompt.com Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org
On Thu, 13 Nov 2003, jini us wrote: > Hi, > > I am starting a new project where I intend to use > embedded database server in my win32 application. > I intend to use VC++ microsoft studio 6.0 as my > development environment. > > The postgres.org website seems to be catering for > people with all sorts of requirements and platforms. > > 1. Where can I find the binary distribution so that I > can use postgres server as an embedded database. > I assume it is a .dll If you truly want to embed a database in your program, you probably don't want postgresql, as it is massive overkill for an embedded database. Look at SQLite: http://www.sqlite.org/ > 3. Is it correct that I do not have to pay any user > licences. > Postgres is free not only for development but also I > can include it in my software package. Correct, postgresql is free as in speech, and free as in beer, and free as in "the village bicycle".
if libpq.dll contains the server and I can call the functions
to start and stop programmatically.
Then I could use Postgres as an embedded database sever in my application.
That way I include libpq.dll in my software package for deployment
with installshield.
So when the user starts my application I would start the database server, then stop it programmatically when the user stops using the application.
I would obviously need some functionality so that I can programmatically
configure which disk I would use to create the database.
I am hoping to be able to create the database on a virtual drive / network drive programmatically from my application.
That is to say when you are running windows your local disk drives are usually C: or D:
However you may also have virtual network drives mapped like X: Y: Z:.
These drives are obviously connected physically on another machine
but you are acessing it via the network card/cable etc.
"Joshua D. Drake" <jd@commandprompt.com> wrote:
Hello,
Are you sure you are not thinking of just the libpq.dll? That would allow
linking to PostgreSQL via C/C++ etc?
Sincerely,
Joshua Drake
jini us wrote:
>It is a shame that postgres is not available as an
>embedded server unlike mysql database server which
>comes in the form of a dll.
>
>However with mysql licence I would have to pay $10,000
>if I wish to include it in mysql as an embedded server
>in my app.
>
>mysql database server is also a TCP/IP socket server
>whether embedded or otherwise.
>
> --- "Joshua D. Drake" wrote: >
>jini us wrote:
>
>
>>>Hi,
>>>
>>>I am starting a new project where I intend to use
>>>embedded database server in my win32 application.
>>> ;I intend to use VC++ microsoft studio 6.0 as my
>>>development environment.
>>>
>>>The postgres.org website seems to be catering for
>>>people with all sorts of requirements and
>>>
>>>
>>platforms.
>>
>>
>>>1. Where can I find the binary distribution so that
>>>
>>>
>>I
>>
>>
>>>can use postgres server as an embedded database.
>>>I assume it is a .dll
>>>
>>>
>>>
>>>
>>No... PostgreSQL is a database server, thus you
>>connect to it via TCP/IP
>>or domain sockets (preferrably TCP/IP).
>>
>>Also an emulation layer such as Cygwin will be
>>required to use PostgreSQL
>>on Windows.
>>
>>
>>
>>>2. Also I would like to have the documentation
>>>
>>>
>>which
>>
>>
>>>shows how to start & stop the server
>>>
>>>
>>programmatically
>>
>>
>>>and execute sql, to create a database, use select
>>>insert , update etc.
>>>
>>>
>>>
>>>
>>>
>>www.postgresql.org click on docs.
>>
>>
>>
>>
>>>3. Is it correct that I do not have to pay any user
>>>licences.
>>>Postgres is free not only for development but also
>>>
>>>
>>I
>>
>>
>>>can include it in my software package.
>>>
>>>
>>>
>>>
>>>
>>Yes that is correct.
>>
>>
>>
>>
>>>Thanks.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>________________________________________________________________________
>>
>>
>>>Want to chat instantly with your online friends?
>>>
>>>
>>Get the FREE Yahoo!
>>
>>
>>>Messenger http://mail.messenger.yahoo.co.uk
>>>
>>>---------------------------(end of
>>>
>>>
>>broadcast)---------------------------
>>
>>
>>>TIP 8: explain analyze is your friend
>>>
>>>
>>>
>>>
>>--
>>Command Prompt, Inc., home of Mammoth PostgreSQL -
>>S/ODBC and S/JDBC
>>Postgresql support, programming shared hosting and
>>dedicated hosting.
>>+1-503-222-2783 - jd@commandprompt.com -
>>http://www.commandprompt.com
>>Editor-N-Chief - PostgreSQl.Org -
>>http://www.postgresql.org
>>
>>
>>
>>---------------------------(end of
>>broadcast)---------------------------
>>TIP 4: Don't 'kill -9' the postmaster
>>
>>
>
>________________________________________________________________________
>Want to chat instantly with your online friends? Get the FREE Yahoo!
>Messenger http://mail.messenger.yahoo.co.uk
>
>
--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-222-2783 - jd@commandprompt.com - http://www.commandprompt.com
Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org
Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger
On Thu, 13 Nov 2003, jini us wrote: > > if libpq.dll contains the server and I can call the functions > to start and stop programmatically. > Then I could use Postgres as an embedded database sever in my application. > That way I include libpq.dll in my software package for deployment > with installshield. > > So when the user starts my application I would start the database server, then stop it programmatically when the user stopsusing the application. > I would obviously need some functionality so that I can programmatically > configure which disk I would use to create the database. > > I am hoping to be able to create the database on a virtual drive / network drive programmatically from my application. > That is to say when you are running windows your local disk drives are usually C: or D: > However you may also have virtual network drives mapped like X: Y: Z:. > These drives are obviously connected physically on another machine > but you are acessing it via the network card/cable etc. No, the libpq.dll is just the connection library. You need to have an actual database up and running to connect to to use it. How much memory do you have? Are you on nvram, which has limited write lifetime? Postgresql loves to write to the storage medium, and will likely wear out a memory stick before too long. How much transaction capability etc. do you need in an embedded app? Postgresql is so heavily optimized for transactions and parallel access safeness that you'll be paying a huge performance and memory usage penalty. Using Postgresql as an "embedded" database is stuffing a rather large load into a rather small sack usually.
Anybody knows of a c++ IDE, similar to Microsoft studio but free. Also good C++ site where I can pick up free components. Thanks. --- "scott.marlowe" <scott.marlowe@ihs.com> wrote: > On Thu, 13 Nov 2003, jini us wrote: > > > > > if libpq.dll contains the server and I can call > the functions > > to start and stop programmatically. > > Then I could use Postgres as an embedded database > sever in my application. > > That way I include libpq.dll in my software > package for deployment > > with installshield. > > > > So when the user starts my application I would > start the database server, then stop it > programmatically when the user stops using the > application. > > I would obviously need some functionality so that > I can programmatically > > configure which disk I would use to create the > database. > > > > I am hoping to be able to create the database on a > virtual drive / network drive programmatically from > my application. > > That is to say when you are running windows your > local disk drives are usually C: or D: > > However you may also have virtual network drives > mapped like X: Y: Z:. > > These drives are obviously connected physically on > another machine > > but you are acessing it via the network card/cable > etc. > > No, the libpq.dll is just the connection library. > You need to have an > actual database up and running to connect to to use > it. > > How much memory do you have? Are you on nvram, > which has limited write > lifetime? Postgresql loves to write to the storage > medium, and will > likely wear out a memory stick before too long. How > much transaction > capability etc. do you need in an embedded app? > Postgresql is so heavily > optimized for transactions and parallel access > safeness that you'll be > paying a huge performance and memory usage penalty. > > Using Postgresql as an "embedded" database is > stuffing a rather large load > into a rather small sack usually. > ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
jini us wrote: > Anybody knows of a c++ IDE, similar to Microsoft > studio but free. > Also good C++ site where I can pick up free > components. I've never used it but if download statistics is correlated in any way to quality Dev-C++ is one of the top downloads on sourceforge: http://sourceforge.net/projects/dev-cpp/ Mike Mascari mascarm@mascari.com
I have just downloaded that one. It doesn't any features for designing GUI forms. It is just a project manager. --- Mike Mascari <mascarm@mascari.com> wrote: > jini us wrote: > > > Anybody knows of a c++ IDE, similar to Microsoft > > studio but free. > > Also good C++ site where I can pick up free > > components. > > I've never used it but if download statistics is > correlated in any way > to quality Dev-C++ is one of the top downloads on > sourceforge: > > http://sourceforge.net/projects/dev-cpp/ > > Mike Mascari > mascarm@mascari.com > > > > ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
Have you ever tried KDevelop (www.kdevelop.org)? it is part of KDE (www.kde.org), the newest version is going to be realesed very soon, but KDE 3.2 beta 1 was released already, get the tarballs from the above mentionned address. I like it a lot, but you should check it out, if it suits your needs. Cheers, Zoltan ----- Original Message ----- From: "jini us" <jiniusuk@yahoo.co.uk> To: "Mike Mascari" <mascarm@mascari.com> Cc: <pgsql-general@postgresql.org> Sent: Friday, November 14, 2003 4:28 AM Subject: Re: [GENERAL] embedded postgresql + C++ IDE > > I have just downloaded that one. > It doesn't any features for designing GUI forms. > It is just a project manager. > > > --- Mike Mascari <mascarm@mascari.com> wrote: > jini > us wrote: > > > > > Anybody knows of a c++ IDE, similar to Microsoft > > > studio but free. > > > Also good C++ site where I can pick up free > > > components. > > > > I've never used it but if download statistics is > > correlated in any way > > to quality Dev-C++ is one of the top downloads on > > sourceforge: > > > > http://sourceforge.net/projects/dev-cpp/ > > > > Mike Mascari > > mascarm@mascari.com > > > > > > > > > > ________________________________________________________________________ > Want to chat instantly with your online friends? Get the FREE Yahoo! > Messenger http://mail.messenger.yahoo.co.uk > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > >
I was looking at the screen shots and the screen shots do not show any features for GUI drag + drop development. Does it have a GUI drag + drop for drawing windows components ? --- "BARTKO, Zoltan" <bartko.zoltan@pobox.sk> wrote: > Have you ever tried KDevelop (www.kdevelop.org)? it > is part of KDE > (www.kde.org), the newest version is going to be > realesed very soon, but KDE > 3.2 beta 1 was released already, get the tarballs > from the above mentionned > address. I like it a lot, but you should check it > out, if it suits your > needs. > > Cheers, > > Zoltan > > ----- Original Message ----- > From: "jini us" <jiniusuk@yahoo.co.uk> > To: "Mike Mascari" <mascarm@mascari.com> > Cc: <pgsql-general@postgresql.org> > Sent: Friday, November 14, 2003 4:28 AM > Subject: Re: [GENERAL] embedded postgresql + C++ IDE > > > > > > I have just downloaded that one. > > It doesn't any features for designing GUI forms. > > It is just a project manager. > > > > > > --- Mike Mascari <mascarm@mascari.com> wrote: > > jini > > us wrote: > > > > > > > Anybody knows of a c++ IDE, similar to > Microsoft > > > > studio but free. > > > > Also good C++ site where I can pick up free > > > > components. > > > > > > I've never used it but if download statistics is > > > correlated in any way > > > to quality Dev-C++ is one of the top downloads > on > > > sourceforge: > > > > > > http://sourceforge.net/projects/dev-cpp/ > > > > > > Mike Mascari > > > mascarm@mascari.com > > > > > > > > > > > > > > > > > ________________________________________________________________________ > > Want to chat instantly with your online friends? > Get the FREE Yahoo! > > Messenger http://mail.messenger.yahoo.co.uk > > > > ---------------------------(end of > broadcast)--------------------------- > > TIP 6: Have you searched our list archives? > > > > http://archives.postgresql.org > > > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
On Friday 14 November 2003 18:47, jini us wrote: > I was looking at the screen shots and the screen shots > do not show any features for GUI drag + drop > development. > > Does it have a GUI drag + drop for drawing windows > components ? Yes. It has Qt designer which supports custom KDE widgets but two things. 1. This discussion is offtopic on this list. 2. I don't know how many people use DnD to design GUIs. Qt offers so much control that it is rather tempting to do GUI in text editor. Shridhar
If you are using Linux for development, you can use QTDesigner or any number of GTK based tools. jini us wrote: >I was looking at the screen shots and the screen shots >do not show any features for GUI drag + drop >development. > >Does it have a GUI drag + drop for drawing windows >components ? > > > --- "BARTKO, Zoltan" <bartko.zoltan@pobox.sk> wrote: > > >>Have you ever tried KDevelop (www.kdevelop.org)? it >>is part of KDE >>(www.kde.org), the newest version is going to be >>realesed very soon, but KDE >>3.2 beta 1 was released already, get the tarballs >>from the above mentionned >>address. I like it a lot, but you should check it >>out, if it suits your >>needs. >> >>Cheers, >> >>Zoltan >> >>----- Original Message ----- >>From: "jini us" <jiniusuk@yahoo.co.uk> >>To: "Mike Mascari" <mascarm@mascari.com> >>Cc: <pgsql-general@postgresql.org> >>Sent: Friday, November 14, 2003 4:28 AM >>Subject: Re: [GENERAL] embedded postgresql + C++ IDE >> >> >> >> >>>I have just downloaded that one. >>>It doesn't any features for designing GUI forms. >>>It is just a project manager. >>> >>> >>> --- Mike Mascari <mascarm@mascari.com> wrote: > >>> >>> >>jini >> >> >>>us wrote: >>> >>> >>>>>Anybody knows of a c++ IDE, similar to >>>>> >>>>> >>Microsoft >> >> >>>>>studio but free. >>>>>Also good C++ site where I can pick up free >>>>>components. >>>>> >>>>> >>>>I've never used it but if download statistics is >>>>correlated in any way >>>>to quality Dev-C++ is one of the top downloads >>>> >>>> >>on >> >> >>>>sourceforge: >>>> >>>>http://sourceforge.net/projects/dev-cpp/ >>>> >>>>Mike Mascari >>>>mascarm@mascari.com >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >________________________________________________________________________ > > >>>Want to chat instantly with your online friends? >>> >>> >>Get the FREE Yahoo! >> >> >>>Messenger http://mail.messenger.yahoo.co.uk >>> >>>---------------------------(end of >>> >>> >>broadcast)--------------------------- >> >> >>>TIP 6: Have you searched our list archives? >>> >>> http://archives.postgresql.org >>> >>> >>> >>> >>---------------------------(end of >>broadcast)--------------------------- >>TIP 4: Don't 'kill -9' the postmaster >> >> > >________________________________________________________________________ >Want to chat instantly with your online friends? Get the FREE Yahoo! >Messenger http://mail.messenger.yahoo.co.uk > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > > -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC - S/JDBC Postgresql support, programming, shared hosting and dedicated hosting. +1-503-222-2783 - jd@commandprompt.com - http://www.commandprompt.com PostgreSQL.Org - Editor-N-Chief - http://www.postgresql.org
jiniusuk@yahoo.co.uk (jini us) writes: > So when the user starts my application I would start the database > server, then stop it programmatically when the user stops using the > application. > I would obviously need some functionality so that I can programmatically > configure which disk I would use to create the database. It is not necessary for PostgreSQL to be a "DLL" in order to all of do these things. Your application can configure where the database server is supposed to find its data, and spawn the database server. This came up a while back on the GnuCash discussion list, and I described how you'd start up a 'pseudo-embedded' instance of PostgreSQL: <http://www.gnucash.org/pipermail/gnucash-devel/2003-June/009418.html> Code to initialize and start up the database: ----------------------------------------------------------------------- mkdir("~/GnuCash/DB"); system("initdb -d ~/GnuCash/DB"); [dribble a few changes into ~/GnuCash/DB/{pg_hba|postgres}.conf, notably turning on TCP/IP, picking a port #, probably not too much else...] system("pg_ctl -D ~/GnuCash/DB start"); ----------------------------------------------------------------------- Code to stop it upon exiting the application: ----------------------------------------------------------------------- system("pg_ctl -D ~/GnuCash/DB stop"); ----------------------------------------------------------------------- I daresay I was a just little bit dogmatic about it, and the approach was not accepted particularly graciously... <http://www.gnucash.org/pipermail/gnucash-devel/2003-June/009449.html> ------------------------------------------------------------------- Derek Atkins wrote: > Christopher Browne <gnucash at cbbrowne.com> writes: > > > It seems no more reasonable to expect that casual home users have to: > > > > - Run mke2fs, or whatever else is involved in setting up filesystems; > > - Run whatever frightening incantations are involved in getting X > > working. > > If this is how you feel then you are grossly over-estimating the > competence and skillset of the average user. Most users grab the > Red Hat install media and click "go". They have no clue what mke2fs > is. They have no clue how to set up X. It nonetheless happens, does it not? They _do_ have to cope with it, in some manner, because X and ext2 don't get there by magic. Reciting some mantra of "embedded database, embedded database" will also not lead to the system being simpler just because it gets repeated enough times. ... much elided ... But none of that changes the vital points, that - The "embedded" process belongs to the user; - So do the files; - It does NOT forcibly require a sysadmin's attentions. ------------------------------------------------------------------- > I am hoping to be able to create the database on a virtual drive / > network drive programmatically from my application. So long as you can run the program: pg_ctl -D X:\WHEREVER_THE_DATA_IS start there oughtn't be a problem with doing this. It is a little bit disappointing that people _haven't_ documented the use of this sort of approach to have PostgreSQL be 'quasi-embedded' in such a manner that the database instance is not made manifestly visible. -- "aa454","@","freenet.carleton.ca" http://cbbrowne.com/info/rdbms.html Why are there flotation devices under plane seats instead of parachutes?
In the last exciting episode, jiniusuk@yahoo.co.uk (jini us) wrote: > It is a shame that postgres is not available as an embedded server > unlike mysql database server which comes in the form of a dll. When the postmaster runs as a separate process, this has three major merits: 1. It takes advantage of the fact that modern operating systems are quite GOOD at spawning multiple processes. VMS and MVS are historically _atrociously_ slow at this, but on Windows NT, the cost of spawning one process can't be _too_ dramatic. 2. It improves reliability since processes using data can't accidentally corrupt the database process(es). 3. As soon as there is more than one process using data, there is a savings in memory consumption since the overhead of establishing dynamic parts of database context only need be paid once. That you regard it as a vital "doctrine" that it should be preferable to embed databases using DLLs does not establish either that: a) The doctrine is actually valid, or b) The architecture of PostgreSQL is likely to be changed to conform to that doctrine. You might instead investigate the notion of running PostgreSQL as a separate process, and see if you can find a way to use it, despite the apparent misfit of expectations. If you fight with PostgreSQL, things will doubtless go badly. If you try to find a way of cooperating with its architecture, you might find some pleasant surprises... > However with mysql licence I would have to pay $10,000 if I wish to > include it in mysql as an embedded server in my app. Wow, that is rather expensive. I thought MySQL was supposed to be "free software," what with being licensed under the GPL and all... -- wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','cbbrowne.com'). http://www3.sympatico.ca/cbbrowne/postgresql.html "I'm sorry, the teleportation booth you have reached is not in service at this time. Please hand-reassemble your molecules or call an operator to help you...."
PostgreSQL is not intended to be embedded into other programs. You might want to try SQLite, it's a free embeddable SQL engine: http://go.jitbot.com/sqlite regards "jini us" <jiniusuk@yahoo.co.uk> wrote in message news:20031113005012.81195.qmail@web86110.mail.ukl.yahoo.com... > Hi, > > I am starting a new project where I intend to use > embedded database server in my win32 application. > I intend to use VC++ microsoft studio 6.0 as my > development environment. > > The postgres.org website seems to be catering for > people with all sorts of requirements and platforms. > > 1. Where can I find the binary distribution so that I > can use postgres server as an embedded database. > I assume it is a .dll > > 2. Also I would like to have the documentation which > shows how to start & stop the server programmatically > and execute sql, to create a database, use select > insert , update etc. > > 3. Is it correct that I do not have to pay any user > licences. > Postgres is free not only for development but also I > can include it in my software package. > > Thanks. > > > > > > > > > ________________________________________________________________________ > Want to chat instantly with your online friends? Get the FREE Yahoo! > Messenger http://mail.messenger.yahoo.co.uk > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend >
I am using MS windows so ideally I would like to get hold of a binary for MS windows --- "Joshua D. Drake" <jd@commandprompt.com> wrote: > If you are using Linux for development, you can use > QTDesigner or any > number of GTK based tools. > > jini us wrote: > > >I was looking at the screen shots and the screen > shots > >do not show any features for GUI drag + drop > >development. > > > >Does it have a GUI drag + drop for drawing windows > >components ? > > > > > > --- "BARTKO, Zoltan" <bartko.zoltan@pobox.sk> > wrote: > > > > > >>Have you ever tried KDevelop (www.kdevelop.org)? > it > >>is part of KDE > >>(www.kde.org), the newest version is going to be > >>realesed very soon, but KDE > >>3.2 beta 1 was released already, get the tarballs > >>from the above mentionned > >>address. I like it a lot, but you should check it > >>out, if it suits your > >>needs. > >> > >>Cheers, > >> > >>Zoltan > >> > >>----- Original Message ----- > >>From: "jini us" <jiniusuk@yahoo.co.uk> > >>To: "Mike Mascari" <mascarm@mascari.com> > >>Cc: <pgsql-general@postgresql.org> > >>Sent: Friday, November 14, 2003 4:28 AM > >>Subject: Re: [GENERAL] embedded postgresql + C++ > IDE > >> > >> > >> > >> > >>>I have just downloaded that one. > >>>It doesn't any features for designing GUI forms. > >>>It is just a project manager. > >>> > >>> > >>> --- Mike Mascari <mascarm@mascari.com> wrote: > > >>> > >>> > >>jini > >> > >> > >>>us wrote: > >>> > >>> > >>>>>Anybody knows of a c++ IDE, similar to > >>>>> > >>>>> > >>Microsoft > >> > >> > >>>>>studio but free. > >>>>>Also good C++ site where I can pick up free > >>>>>components. > >>>>> > >>>>> > >>>>I've never used it but if download statistics is > >>>>correlated in any way > >>>>to quality Dev-C++ is one of the top downloads > >>>> > >>>> > >>on > >> > >> > >>>>sourceforge: > >>>> > >>>>http://sourceforge.net/projects/dev-cpp/ > >>>> > >>>>Mike Mascari > >>>>mascarm@mascari.com > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >________________________________________________________________________ > > > > > >>>Want to chat instantly with your online friends? > >>> > >>> > >>Get the FREE Yahoo! > >> > >> > >>>Messenger http://mail.messenger.yahoo.co.uk > >>> > >>>---------------------------(end of > >>> > >>> > >>broadcast)--------------------------- > >> > >> > >>>TIP 6: Have you searched our list archives? > >>> > >>> http://archives.postgresql.org > >>> > >>> > >>> > >>> > >>---------------------------(end of > >>broadcast)--------------------------- > >>TIP 4: Don't 'kill -9' the postmaster > >> > >> > > > >________________________________________________________________________ > >Want to chat instantly with your online friends? > Get the FREE Yahoo! > >Messenger http://mail.messenger.yahoo.co.uk > > > >---------------------------(end of > broadcast)--------------------------- > >TIP 8: explain analyze is your friend > > > > > > -- > Command Prompt, Inc., home of Mammoth PostgreSQL - > S/ODBC - S/JDBC > Postgresql support, programming, shared hosting and > dedicated hosting. > +1-503-222-2783 - jd@commandprompt.com - > http://www.commandprompt.com > PostgreSQL.Org - Editor-N-Chief - > http://www.postgresql.org > > ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
I would class your solution as a work around rather than a "natural solution". Anyway I am using MS windows and to implement postgres as embedded, using your approach, would probably become complicated. .It would probably introduce unwanted bugs in my software. --- Christopher Browne <cbbrowne@acm.org> wrote: > jiniusuk@yahoo.co.uk (jini us) writes: > > So when the user starts my application I would > start the database > > server, then stop it programmatically when the > user stops using the > > application. > > > I would obviously need some functionality so that > I can programmatically > > configure which disk I would use to create the > database. > > It is not necessary for PostgreSQL to be a "DLL" in > order to all of do > these things. > > Your application can configure where the database > server is supposed > to find its data, and spawn the database server. > > This came up a while back on the GnuCash discussion > list, and I > described how you'd start up a 'pseudo-embedded' > instance of > PostgreSQL: > > <http://www.gnucash.org/pipermail/gnucash-devel/2003-June/009418.html> > > Code to initialize and start up the database: > ----------------------------------------------------------------------- > mkdir("~/GnuCash/DB"); > system("initdb -d ~/GnuCash/DB"); > [dribble a few changes into > ~/GnuCash/DB/{pg_hba|postgres}.conf, > notably turning on TCP/IP, picking a port #, > probably not too > much else...] > system("pg_ctl -D ~/GnuCash/DB start"); > ----------------------------------------------------------------------- > > Code to stop it upon exiting the application: > ----------------------------------------------------------------------- > system("pg_ctl -D ~/GnuCash/DB stop"); > ----------------------------------------------------------------------- > > I daresay I was a just little bit dogmatic about it, > and the approach > was not accepted particularly graciously... > > <http://www.gnucash.org/pipermail/gnucash-devel/2003-June/009449.html> > > ------------------------------------------------------------------- > Derek Atkins wrote: > > Christopher Browne <gnucash at cbbrowne.com> > writes: > > > > > It seems no more reasonable to expect that > casual home users have to: > > > > > > - Run mke2fs, or whatever else is involved in > setting up filesystems; > > > - Run whatever frightening incantations are > involved in getting X > > > working. > > > > If this is how you feel then you are grossly > over-estimating the > > competence and skillset of the average user. Most > users grab the > > Red Hat install media and click "go". They have > no clue what mke2fs > > is. They have no clue how to set up X. > > It nonetheless happens, does it not? They _do_ have > to cope with it, > in some manner, because X and ext2 don't get there > by magic. > > Reciting some mantra of "embedded database, embedded > database" will > also not lead to the system being simpler just > because it gets > repeated enough times. > > ... much elided ... > > But none of that changes the vital points, that > - The "embedded" process belongs to the user; > - So do the files; > - It does NOT forcibly require a sysadmin's > attentions. > ------------------------------------------------------------------- > > > I am hoping to be able to create the database on a > virtual drive / > > network drive programmatically from my > application. > > So long as you can run the program: > > pg_ctl -D X:\WHEREVER_THE_DATA_IS start > > there oughtn't be a problem with doing this. > > It is a little bit disappointing that people > _haven't_ documented the > use of this sort of approach to have PostgreSQL be > 'quasi-embedded' in > such a manner that the database instance is not made > manifestly > visible. > -- > "aa454","@","freenet.carleton.ca" > http://cbbrowne.com/info/rdbms.html > Why are there flotation devices under plane > seats instead of > parachutes? > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the > unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
On Nov 14, 2003, at 14:13, jini us wrote: > I would class your solution as a work around > rather than a "natural solution". It really seemed like the obvious way to do it (I'm sure I'm not the only person who thought of that, but didn't post it). > Anyway I am using MS windows and to implement > postgres as embedded, using your approach, would > probably become complicated. > .It would probably introduce unwanted bugs in my > software. I believe it would be you introducing those bugs if you do not initialize the DB correctly, regardless of the mechanism. Now, how many bugs do you think it would create in postgres if the entire interface model were changed from postmaster/postgres processes to having multiple threads in a single application trying to issue queries in the in-process DB. What happens to the DB when your app segfaults? Are there any signal handlers postgres uses that you would want to use in your app? Do you really need to redesign the way postgres works just because you don't want to manage the resource as a process rather than a different type of API? -- Dustin Sallings
On Fri, 14 Nov 2003, Dustin Sallings wrote: > > On Nov 14, 2003, at 14:13, jini us wrote: > > > I would class your solution as a work around > > rather than a "natural solution". > > It really seemed like the obvious way to do it (I'm sure I'm not the > only person who thought of that, but didn't post it). LOL, I was just composing and then aborted an answer mentioning mindsets and it being natural to me. > > > Anyway I am using MS windows and to implement > > postgres as embedded, using your approach, would > > probably become complicated. > > .It would probably introduce unwanted bugs in my > > software. > > I believe it would be you introducing those bugs if you do not > initialize the DB correctly, regardless of the mechanism. An objection made, if I read the edited out sections correctly, that a user shouldn't have to worry about formating the chosen disk etc, it should just happen. Well there's nothing in this solution that prevents that from happening. Indeed, if there's no user involvement in configuring a linked in embedded solution then there's no user involvement required in the configuration. How does "no user involvement required" morph into "user must do stuff"? > > Now, how many bugs do you think it would create in postgres if the > entire interface model were changed from postmaster/postgres processes > to having multiple threads in a single application trying to issue > queries in the in-process DB. What happens to the DB when your app > segfaults? Are there any signal handlers postgres uses that you would > want to use in your app? Do you really need to redesign the way > postgres works just because you don't want to manage the resource as a > process rather than a different type of API? Write a library that provides the API required to which the app. can be linked but which chats/controls the server. If I want to find files in one directory (or folder :) that exist in another I don't ask that bash, korn shell etc. be linked with a new library for the job. No, I use the existing components in a combination that does the job. -- Nigel J. Andrews ( ( cd onedirectory; ls ); ( cd otherdirectory; ls ) ) | sort | uniq -d if you really want to know.
On Nov 14, 2003, at 15:43, Nigel J. Andrews wrote: > LOL, I was just composing and then aborted an answer mentioning > mindsets and it > being natural to me. [...] > Write a library that provides the API required to which the app. can > be linked > but which chats/controls the server. Haha. I was just having this conversation with a co-worker. I was suggesting writing a -lpqembed and giving it out as the ``embedded solution.'' Because really, who would care about the difference? Now, if only I had a use for such a thing... -- Dustin Sallings
I have come to the conclusion that for my purpose I would be better off using sqlite from www.sqlite.org or firebird from www.phoenix.com. Although mysql provides client APIs & server APIs and is stable. But there seems to be doubt whether mysql is actually free if I wish to use it as an embedded database. It has been suggested that I would have to pay $10,000 one off licence fee if I include mysql in my app. Another person suggested that mysql is free to include in my app, so I am simply not sure over the licence costs of mysql. --- Dustin Sallings <dustin@spy.net> wrote: > > On Nov 14, 2003, at 14:13, jini us wrote: > > > I would class your solution as a work around > > rather than a "natural solution". > > It really seemed like the obvious way to do it (I'm > sure I'm not the > only person who thought of that, but didn't post > it). > > > Anyway I am using MS windows and to implement > > postgres as embedded, using your approach, would > > probably become complicated. > > .It would probably introduce unwanted bugs in my > > software. > > I believe it would be you introducing those bugs if > you do not > initialize the DB correctly, regardless of the > mechanism. > > Now, how many bugs do you think it would create in > postgres if the > entire interface model were changed from > postmaster/postgres processes > to having multiple threads in a single application > trying to issue > queries in the in-process DB. What happens to the > DB when your app > segfaults? Are there any signal handlers postgres > uses that you would > want to use in your app? Do you really need to > redesign the way > postgres works just because you don't want to manage > the resource as a > process rather than a different type of API? > > -- > Dustin Sallings > > > ---------------------------(end of > broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose > an index scan if your > joining column's datatypes do not match ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
After a long battle with technology, jiniusuk@yahoo.co.uk (jini us), an earthling, wrote: > It has been suggested that I would have to pay > $10,000 one off licence fee if I include mysql in my > app. > Another person suggested that mysql is free to include > in my app, so I am simply not sure over the licence > costs of mysql. There is a ready way of disambiguating _that_ part; were you planning to license your application under the terms of the GPL? If so, then there is license compatibility, and you oughtn't need to pay anything. If you were NOT planning to use the GPL, then you'll need to for license fees of on the order of $500 per "server," where presumably each deployment of your application attracts a license charge. A $10K arrangement sounds like a minimum charge where you might be buying 30 or so licenses up front, and would get a pretty steep discount on the basis of prepaying for licenses. (SolidTech went to a model similar to that; they used to sell licenses for about $150/server, and some users were quite chagrined when they discovered they couldn't get small numbers of licenses anymore...) But that's only a wild guess; the company doesn't publish that information publicly on their pricing web page. In any case, it is really not a matter that would be properly addressed here; you really should contact their sales department to get authoritative details. -- If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me http://www3.sympatico.ca/cbbrowne/x.html Keeping a secret "Hall Of Flame" file of people's mail indiscretions, or copying messages to private mailing lists for subsequent derision, is good fun and also a worthwhile investment in case you need to blackmail the senders later. -- from the Symbolics Guidelines for Sending Mail
After a long battle with technology, jiniusuk@yahoo.co.uk (jini us), an earthling, wrote: > I would class your solution as a work around rather than a "natural > solution". It may not be the approach you _expected_. > Anyway I am using MS windows and to implement postgres as embedded, > using your approach, would probably become complicated. Sure, you'll have to decide where to put the directory. That could get quite hideous... > It would probably introduce unwanted bugs in my software. But THAT seems very odd. Can you be more specific about the sorts of bugs that would be expected to appear by virtue of _not_ including the "postmaster" inside your application? I would think the opposite would be true; that this would _diminish_ the likelihood of bugs, since it would outright eliminate the possibility of your own code accidentally trampling on database memory, which is a BIG risk that would be introduced by embedding the database in your application. -- wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','acm.org'). http://www3.sympatico.ca/cbbrowne/linuxxian.html Who needs fault-tolerant computers when there's obviously an ample market of fault-tolerant users?
cbbrowne@acm.org says... > > However with mysql licence I would have to pay $10,000 if I wish to > > include it in mysql as an embedded server in my app. > Wow, that is rather expensive. I thought MySQL was supposed to be > "free software," what with being licensed under the GPL and all... Only if your app is GPL'd also - if you want to charge money for it and make it closed source, then you pay - I did think that 10.000 was a bit on the steep side. Paul... -- plinehan__AT__yahoo__DOT__com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post.
jiniusuk@yahoo.co.uk says... > It has been suggested that I would have to pay > $10,000 one off licence fee if I include mysql in my > app. https://order.mysql.com/ Seems to be 500 dollars to me. Paul... -- plinehan__AT__yahoo__DOT__com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post.