Re: stored procedure multiple call call question

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: stored procedure multiple call call question
Дата
Msg-id k5bem5$8ur$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на stored procedure multiple call call question  (Chris McDonald <chrisjonmcdonald@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: non-integer constant in ORDER BY: why exactly, and documentation?
Следующее
От: Arvind Singh
Дата:
Сообщение: Improve MMO Game Performance