Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-24 Thread jun yang
2011/5/24 Craig Ringer : > On 24/05/11 12:46, jun yang wrote: > >> thanks for the info,i am just not have such deep learn of pg internal, >> i am on user level,not hacker,so the mail is in pgsql-general,not >> hacker list. > > Then you really, really, REALLY don't want to start a thread within the

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-24 Thread jun yang
2011/5/24 Rick Genter : > > On May 23, 2011, at 9:46 PM, jun yang wrote: > >> thanks for the info,i am just not have such deep learn of pg internal, >> i am on user level,not hacker,so the mail is in pgsql-general,not >> hacker list. > > What you are asking to do is not a typical user function. It

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-23 Thread Craig Ringer
On 24/05/11 12:46, jun yang wrote: > thanks for the info,i am just not have such deep learn of pg internal, > i am on user level,not hacker,so the mail is in pgsql-general,not > hacker list. Then you really, really, REALLY don't want to start a thread within the backend, and should avoid spawning

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-23 Thread Rick Genter
On May 23, 2011, at 9:46 PM, jun yang wrote: > thanks for the info,i am just not have such deep learn of pg internal, > i am on user level,not hacker,so the mail is in pgsql-general,not > hacker list. What you are asking to do is not a typical user function. It would be more appropriate for a "

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-23 Thread jun yang
2011/5/23 Craig Ringer : > On 23/05/2011 10:13 AM, jun yang wrote: > >> actually, we will write the procedure in pl/python,then fork a new >> thread or a new process which is easy. > > Yikes. Be careful there - it's not as easy as you think it is. > > Spawning a new thread within a PostgreSQL backe

Re: Fwd: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread John R Pierce
On 05/22/11 7:14 PM, jun yang wrote: actually, we will write the procedure in pl/python,then fork a new thread or a new process which is easy it would have to be a top level process, as you can't have multiple threads within a single postgres service connection interacting with postgres unles

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Craig Ringer
On 23/05/2011 9:37 AM, jun yang wrote: what we want to do is explore the ability to move the system to the architecture like below: some pg---message broker(qpid)---(web front and some collect data terminal,some business logic server,some system status monitor) when pg start it subscribe to qpid

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Darren Duncan
John R Pierce wrote: On 05/22/11 10:45 AM, Darren Duncan wrote: Absolutely. But if the kind of stored procedures were supported that can do anything a database client can do, including transaction control statements, then the main program routine would typically be one of those. yes, but p

Fwd: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
-- Forwarded message -- From: jun yang Date: 2011/5/23 Subject: Re: [GENERAL] how to start a procedure after postgresql started. To: Craig Ringer 2011/5/23 Craig Ringer : > On 23/05/2011 9:37 AM, jun yang wrote: > >> what we want to do is explore the ability to mov

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
2011/5/22 Scott Marlowe : > On Sun, May 22, 2011 at 6:49 AM, jun yang wrote: >> 2011/5/22 Scott Marlowe : >>> On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: now all the question: 1.how start a procedure or a script after postgresql start. >>> >>> Do you need this stored procedure or

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread John R Pierce
On 05/22/11 10:45 AM, Darren Duncan wrote: ...but your entire application would be running in a single transaction. I don't think thats a good thing. Absolutely. But if the kind of stored procedures were supported that can do anything a database client can do, including transaction control

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
2011/5/23 Darren Duncan : > John R Pierce wrote: >> >> On 05/21/11 10:41 PM, Darren Duncan wrote: >>> >>> Well, if you can run a stored procedure automatically when Postgres >>> starts, that looks like a necessary step to being able to implement an >>> entire application inside Postgres. >>> >>> St

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Darren Duncan
John R Pierce wrote: On 05/21/11 10:41 PM, Darren Duncan wrote: Well, if you can run a stored procedure automatically when Postgres starts, that looks like a necessary step to being able to implement an entire application inside Postgres. Starting Postgres is running the application. The ana

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Scott Marlowe
On Sun, May 22, 2011 at 6:49 AM, jun yang wrote: > 2011/5/22 Scott Marlowe : >> On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: >>> now all the question: >>> 1.how start a procedure or a script after postgresql start. >> >> Do you need this stored procedure or script to always run at pg >> data

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
2011/5/22 Scott Marlowe : > On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: >> now all the question: >> 1.how start a procedure or a script after postgresql start. > > Do you need this stored procedure or script to always run at pg > database start?  Or every time a client connects to the databa

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
we don't need se-linux function now ,so it is not the good idea, and se-linux don't available on windows. 2011/5/22 Pavel Stehule : > Hello > > 2011/5/22 jun yang : >> now all the question: >> 1.how start a procedure or a script after postgresql start. >> 2.how to get notify when a table created.

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-21 Thread John R Pierce
On 05/21/11 10:41 PM, Darren Duncan wrote: Well, if you can run a stored procedure automatically when Postgres starts, that looks like a necessary step to being able to implement an entire application inside Postgres. Starting Postgres is running the application. The analogy is that Postgres

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-21 Thread Scott Marlowe
On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: > now all the question: > 1.how start a procedure or a script after postgresql start. Do you need this stored procedure or script to always run at pg database start? Or every time a client connects to the database? Or every minute, or every hou

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-21 Thread Darren Duncan
Pavel Stehule wrote: Hello 2011/5/22 jun yang : now all the question: 1.how start a procedure or a script after postgresql start. 2.how to get notify when a table created. 3.how to get notify when a database created. Probably it isn't possible with Pg 9.0 and older. Maybe it is possible with

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-21 Thread Pavel Stehule
Hello 2011/5/22 jun yang : > now all the question: > 1.how start a procedure or a script after postgresql start. > 2.how to get notify when a table created. > 3.how to get notify when a database created. > Probably it isn't possible with Pg 9.0 and older. Maybe it is possible with callbacks for S

[GENERAL] how to start a procedure after postgresql started.

2011-05-21 Thread jun yang
now all the question: 1.how start a procedure or a script after postgresql start. 2.how to get notify when a table created. 3.how to get notify when a database created. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq