Re: stored procedure multiple call call question - Mailing list pgsql-general

From Jasen Betts
Subject Re: stored procedure multiple call call question
Date
Msg-id k5bem5$8ur$1@reversiblemaps.ath.cx
Whole thread Raw
In response to stored procedure multiple call call question  (Chris McDonald <chrisjonmcdonald@gmail.com>)
List pgsql-general
On 2012-10-02, Chris McDonald <chrisjonmcdonald@gmail.com> wrote:
> Hi,
>
>
> If I had a single table targ to insert into I would do an
>
>   INSERT INTO targ SELECT thiscol, thatcol, theothercol FROM FOO.
>
> The problem is that I have tables targ1, targ2, targn to insert things into and a nice stored procedure myproc which
doesthe insertion into all 3 tables - problem is that I dont see how I can effectively do  
>
>    INSERT INTO myproc SELECT thiscol, thatcol, theothercol FROM FOO.

see the chapter on partitioning for info on how to write a rule or
trigger to do it with syntax like that.

However with what you already have you you can do this:

   SELECT  myproc(thiscol, thatcol, theothercol) FROM FOO;


--
⚂⚃ 100% natural

pgsql-general by date:

Previous
From: Jasen Betts
Date:
Subject: Re: non-integer constant in ORDER BY: why exactly, and documentation?
Next
From: Arvind Singh
Date:
Subject: Improve MMO Game Performance