Re: how to start a procedure after postgresql started. - Mailing list pgsql-general

From Darren Duncan
Subject Re: how to start a procedure after postgresql started.
Date
Msg-id 4DD8A221.3020405@darrenduncan.net
Whole thread Raw
In response to Re: how to start a procedure after postgresql started.  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: how to start a procedure after postgresql started.  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Pavel Stehule wrote:
> Hello
>
> 2011/5/22 jun yang <slickqt@gmail.com>:
>> 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 SE-Linux support in 9.1, but you have to write
> module in C.

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 is
the VM/language interpreter and the stored procedure is the script to run.

Now if said stored procedure has access to features that collectively let it be
computationally complete, including arbitrary user I/O, then you're done.

-- Darren Duncan

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: how to start a procedure after postgresql started.
Next
From: Scott Marlowe
Date:
Subject: Re: how to start a procedure after postgresql started.