Sharing DB connections between programs

Поиск
Список
Период
Сортировка
От James Thompson
Тема Sharing DB connections between programs
Дата
Msg-id Pine.GSO.4.05.9903200754460.27689-100000@noether.math.ksu.edu
обсуждение исходный текст
Список pgsql-general
I have two programs A & B and a library C (postgres acces via ecpg)

A is tcl/tk gui tied to C

B generates postscript output (Quote/Sales order) for the records created
by A.  It pulls its data directly from the database via calls to C.

I wanted B to be seperate from A because I see B generating HTML, SGML,
etc. in the future.

Right now B can be called from the command line and it generates its
output to stdout.  Program A simply creates a shell and that executes

b username password servername recordnum | lpr

This seems very kludged.  I don't like the fact that the password is part
of the command line.  It seems that a simple ps at the right time would
give a person your database password.  I would also prefer A to not keep a
copy of the password in a variable.  I'm not a security expert but this
also seems like a bad idea to me.

My current thinking is that I should share the connection to the database
using method ????.

So what would be a good way to do this.  Shared memory?  Pipes?  I never
user either of those in a program but I'm willing to learn.  Something
else?  Cobra? (I have NO idea how this stuff works, but willing to learn)

Any ideas or suggestions you may have are greatly appreciated.  Thank you.

->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<
James Thompson    138 Cardwell Hall  Manhattan, Ks   66506    785-532-0561
Kansas State University                          Department of Mathematics
->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<



В списке pgsql-general по дате отправления:

Предыдущее
От: "Ronald L. Chichester"
Дата:
Сообщение: Web Tools
Следующее
От: "Robert McArthur"
Дата:
Сообщение: ...